CMovement::IntegrateFacing
function · collision · primitive
- Address
0x7c4f30· 77 bytes, up to0x7c4f7c- Signature
void __thiscall (CMovement *this, float t, const float *rate)- Meaning
- Sets the facing to the anchor facing plus the turn rate times t, reduced into [0, 2π]
- Confidence
- verified, proof one
- Finding
- collision/kinematics#facing-and-pitch-integration
- Test
collision::strafe_turn_difftest,collision::strafe_turn_trajectory
Finding: Facing and pitch integration in collision: kinematics
For t seconds since the anchors and a turn rate ω (the float *override when the pointer is
not null, else 0x7c5c50() rounded to a float), 0x7c4f30 stores
+0x1c = fl(r) with r = fmod(ω·t + +0x50, 2π), or fl(r + 2π) when r < 0.
0x7c4f80 takes θ = 0x7c5c90()·t + +0x54 and stores +0x20: −π/2 for θ < −π/2, fl(θ) for
θ < π/2, else π/2. A NaN θ stores π/2.
Both read the anchors and write the live values; nothing reads the old +0x1c or +0x20.
The derivation is in the doc.
Callers 1
- CMovement::ComputeDisplacement collision
Callees 2
- __CIfmod crt
- CMovement::GetTurnRate collision
Calls and jumps by a bare address, from tables/calls.tsv.