benilla-re systems structs docs

CMovement::LimitStepByFall

function · collision · primitive

Address
0x635450 · 255 bytes, up to 0x63554e
Signature
float __thiscall (CMovement *this, float remaining, float time, float *move, float *length, int headHit, float horizontal)
Meaning
Returns an airborne step's time from the fall arc, shortening the move's horizontal part to fit
Confidence
verified, proof one
Finding
collision/airborne#step-time-from-the-fall
Test
collision::fall_step_difftest

Finding: Step time from the fall in collision: airborne

0x635450(R, t, &D, &a, head, h) returns the step time in seconds, at 53 bits. k = float(|D.xy|/h·R) for h > 2^-20, else 0. tf = 0x7c5f50(float((+0x7c − +0x18) − D.z), rising), the arc time at which the fall reaches the step's end height, with rising = 0x635550(t, R, D, head). Then, with d = tf − t:

caseresult
tf ≤ tD = 0, a = 0, return 0
d > Rreturn R
d < kD.x, D.y scaled by d/k, a = float(|D|), return d
otherwise, NaN includedreturn d

0x635550 returns 1 when head is set, or when +0xa0 < 0 (or NaN) and, with Ta = float(0x7c5da0()), either t + R < Ta, or t ≤ Ta and ((Ta − t)·+0x84)² > D.y² + D.x².

The derivation is in the doc.

Callers 1

Callees 2

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