CMovement::GetFallTime
function · collision · primitive
- Address
0x7c5f50· 360 bytes, up to0x7c60b7- Signature
float __thiscall (CMovement *this, float drop, uint32_t first_root)- Meaning
- Returns the arc time at which the drop reaches a distance, capped; first_root picks the earlier root
- Confidence
- verified, proof one
- Finding
- collision/falling#fall-time-for-a-drop
- Test
collision::fall_physics_difftest
Finding: Fall time for a drop in collision: falling
0x7c5f50(d, first) returns the arc time at which the drop reaches d, inverting 0x7c5e70; the
fall resolver 0x635450 calls it. With v = min(+0xa0, T) as in 0x7c5d20:
- |v| below 2⁻²²: tT = (1/g)·T and dT = tT·T·0.5. For d < dT it returns √(d·(2/g)), or 0 for
d ≤ 0; otherwise, NaN too, (d − dT)/T + tT.
firstis not read. - otherwise: s = √(v·v + d·2g), or 0 when that sum is not positive; t2 = (s − v)·(1/g); when
t2 exceeds tT = float((T − v)·(1/g)), t2 = (d − (tT·(g/2) + v)·tT)/T + tT. With
first0 it returns t2, else t1 = float((−v − s)·(1/g)), raised to 0 when negative.
The derivation is in the doc.
Callers 1
- CMovement::LimitStepByFall collision
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.