CMovement::ResolveWalk
function · collision · primitive
- Address
0x6367b0· 2437 bytes, up to0x637134- 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 result | effect |
|---|---|
| no hit | used += rem; with ms − used ≥ 1, resume dir with rem = ms − used and length rem/ms·dist (0x63694d); else settle (0x636dcd) |
| hit | dt = t/len·rem, used += dt, rem −= dt, len −= t, deflect, sweep again |
hit, ms − used < 1 | end, re-anchoring unless ` |
| counter past 5 | end, 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
- CMovement::ResolveDisplacement collision
Callees 14
- SetVector3 spline
- IsUnitPlayerDriven objectlayer
- CMovement::SetTransportFromSupport collision
- CMovement::GetScaleRatio collision
- CMovement::SweepVolume collision
- CMovement::ClassifyContactTriangle collision
- CMovement::LimitFaceRise collision
- ComputeWallPushOut collision
- CMovement::ProbeStepUp collision
- SelectBevelContactNormal collision
- InitPlaneUp collision
- CMovement::UpdateAnchors collision
- GetFeatherFallTerminalVelocity collision
- CMovement::StartFalling2 collision
Calls and jumps by a bare address, from tables/calls.tsv.