benilla-re systems structs docs

CMovement::ResolveWalk

function · collision · primitive

Address
0x6367b0 · 2437 bytes, up to 0x637134
Signature
uint32_t __thiscall (CMovement *this, uint32_t time, uint32_t ms, float dist, const float *dir)
Meaning
Moves a grounded mover with deflection, steps and settle, or starts its fall, and returns the ms consumed
Confidence
verified, proof one
Finding
collision/walking#walk-resolver-loop
Test
collision::walkmode_difftest, collision::walkmode_cos80_difftest, collision::walkmode_sweep_miss_difftest

Finding: Walk resolver loop in collision: walking

0x6367b0 moves a grounded mover dist along (dir.x, dir.y, 0) within ms; time is unused. With |dist| < 2^-20 it returns ms at once. With no candidate face it starts a fall, 0x7c61f0(0), and returns 0. A hovering mover (flag 0x40000000) first sweeps 1.0 down and keeps the travel c0. Each sweep adds float(step·t) to the position. Time is two floats, rem = ms and used = 0.

sweep resulteffect
no hitused += rem; with ms − used ≥ 1, resume dir with rem = ms − used and length rem/ms·dist (0x63694d); else settle (0x636dcd)
hitdt = t/len·rem, used += dt, rem −= dt, len −= t, deflect, sweep again
hit, ms − used < 1end, re-anchoring unless `
counter past 5end, re-anchoring

A short hit has dt < 1; the counter starts at 0, is 1 after any longer hit, grows per short hit, and past 5 ends the loop.

The derivation is in the doc.

Callers 1

Callees 14

Calls and jumps by a bare address, from tables/calls.tsv.