CMovement::LimitStepByFall
function · collision · primitive
- Address
0x635450· 255 bytes, up to0x63554e- 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:
| case | result |
|---|---|
| tf ≤ t | D = 0, a = 0, return 0 |
| d > R | return R |
| d < k | D.x, D.y scaled by d/k, a = float(|D|), return d |
| otherwise, NaN included | return 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
- CMovement::ResolveAirborneMove collision
Callees 2
- CMovement::IsRisingThroughStep collision
- CMovement::GetFallTime collision
Calls and jumps by a bare address, from tables/calls.tsv.