CMovement::GetFallDistance
function · collision · primitive
- Address
0x7c5e70· 137 bytes, up to0x7c5ef8- Signature
float __thiscall (CMovement *this, float t)- Meaning
- Returns the drop t seconds into the arc: (v + g·t/2)·t, or the parabola to the cap and then linear at the cap
- Confidence
- verified, proof one
- Finding
- collision/falling#fall-distance
- Test
collision::gravity_fall_difftest
Finding: Fall distance in collision: falling
0x7c5e70(t) returns the drop D(t) at 53 bits. With vc as in 0x7c5d20: while vc + g·t is
below or equal to T, D = (vc + (g/2)·t)·t. Above it, or NaN, with tT = (T − vc)·(1/g),
D = (vc + (g/2)·tT)·tT + (t − tT)·T: the parabola to the cap, then straight at T. 0x7c5f00(ms)
calls it with t = float(ms · 0.001). 0x7c5f30(ms) returns z + D. 0x7c6110(ms, z) returns D,
less (+0x7c − z) while 0x2000 is set. 0x7c6140(ms) passes the mover's own z: the further
drop from the current height to the arc at ms. The resolvers 0x633840 and 0x635b00 call it
with +0x78 plus the step's milliseconds (0x633a31, 0x635b2e), and 0x635f80 too.
The derivation is in the doc.
Callers 1
- CMovement::GetFallDistanceMs collision
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.