WASD: direction movement steers the walk path directly

The keys rewrite the hero's path every cCreature::Update: one segment
along the held direction, the facing set to it, sliding along blocked
cells. Starting from idle runs the game's own Think steps at once
(StartPendingWalk, WalkAction) instead of waiting up to 110 ms, so
weapon switches no longer stop the walk. Stops wait 50 ms after the
keys are released, and a stop in progress is taken back when keys are
held again. Names for movement, stats and text-key functions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-18 03:18:51 +02:00
1 parent d296e2850b
commit 84c50d8c33
6 files changed
+422 -104

No files matched your search

+34
View File
@@ -258,3 +258,37 @@
0x005819a0 cCreatureArts::FindCombo # (id) -> index, 4 if none
0x00581410 cCreatureArts::ComboTooltip # (index, text, mode)
0x004d2970 FindComboDef # (0x200..0x204) -> 0x30-byte entry at 0x953348
# --- movement (WASD direction movement, 2026-10-18) ---------------------------
0x00594110 cCreature::Update # (u8), ret 4; ~40/s: walks the path (+0x2ed) into g_creatureNewPosition, Place
0x00593c50 cCreature::CanStepTo # (x, y, position*), ret 0xc; refuses an unwalkable other cell; side effects
0x004f7b20 cCreature::IsCellWalkable # (cell position*), ret 4; read-only
0x00593290 cCreature::BlendToAnimation # (anim, duration, speed, scale): Granny cross-fade
0x0054e540 cCreature::ResetToIdle # (notify, any level): idle animation, action 0 phase 1, pending 0 (weapon class change)
0x00622570 MapPosition_Init # {u16 area, x, y, u8 level}
0x00622590 MapPosition_Set # from (area, x, y, level)
0x006225c0 MapPosition_ToCell # world units -> cells (/ 53.66563)
0x00ad2368 g_creatureNewPosition # MapPosition the walk step computes before Place
0x0065f010 cTextureCache::Get # (id): loads on demand, touches the LRU
# --- UI edit control ---------------------------------------------------------
0x00737ae0 cUI_EditControl::Render # vf14, ret 4; returns at once while hidden
0x007372b0 cUI_EditControl::HandleEvent # vf10
0x00546df0 cCreature::WeaponClass # (0) -> motion set index
0x004dbaa0 cCreature::ContactDistance # (other): mean of the body radii
0x00537430 cCreature::Think # vf04 (float elapsed), ret 4; ~every 110 ms: pending action (+0xfc), then the action's handler
0x004ede70 cCreature::StartPendingWalk # (): pending walk (+0xfc 2) -> action 1, params +0x100 -> +0x154
0x004f45b0 cCreature::WalkAction # (): walk action handler; phase 0 plans the path, facing, animation
# --- statistics / survival bonus (2026-10-18) ----------------------------------
0x00425160 cStatsManager::Instance # cdecl (player id, ignored) -> record at 0xaa3518
0x00424930 cStatsManager::AddTime # (float s, alive): play time (+0x56f8 h, +0x56fc min, +0x5700 ms), survival +0x570c ms
0x004245a0 cStatsManager::OnHeroDeath # deaths +0x56f4 += 1, survival time = 0
0x004245c0 cStatsManager::Deaths
0x00424520 cStatsManager::SurvivalSeconds # +0x570c / 1000
0x00424540 cStatsManager::SetSurvivalSeconds # (s), ret 4
0x00424560 cStatsManager::CountSpawn # +0x5710 u16 (random spawns near the hero, 0x45ff50)
0x00424ce0 cStatsManager::Serialize # (stream, write): ends with magic 0xF00DF00D; survival time not included
0x00565c30 DiminishingCurve # (min, x, half, max): 0 below 1, else min + 2(max-min)(1 - 1/((x-1)/half + 1))
0x006046f0 ItemDataMgr::saveHero # 0x22c header + 0x40 block (+0 deaths, +8 survival s, +0xc spawns)
0x00605900 ItemDataMgr::loadHero
0x00672fd0 TextManager::GetTextByKey # (key string): id = hash 0x80e010
0x0080e010 TextKeyHash # h = (h*113 + toupper(c)) % 999999991, & 0x7fffffff