CMovement::ComputeDisplacement
function · collision · primitive
- Address
0x7c5360· 264 bytes, up to0x7c5467- Signature
uint32_t __thiscall (CMovement *this, uint32_t ms, const float *rate, float *out)- Meaning
- Integrates facing and pitch over ms and writes the displacement the movement flags select
- Confidence
- verified, proof one
- Finding
- collision/kinematics#displacement-dispatcher
- Test
collision::tf_substep_dt_difftest,collision::pitch_land_step_trace
Finding: Displacement dispatcher in collision: kinematics
0x7c5360(ms, override, out) returns 0 for ms = 0. Else t = fl(ms · 0.001) (0x3a83126f, ms
unsigned), and builds a mode. With 0x30 set or override not null it calls
0x7c4f30(t, override) and sets bit 2 unless 0x2000 (falling) is set; with 0xc0, swimming or not, it calls
0x7c4f80(t) and sets bit 8; 0x3 sets bit 1 and 0xc bit 4. The mode picks the displacement:
| modes (1 move, 2 turn, 4 strafe, 8 pitch) | handler | returns |
|---|---|---|
| 0 | none | 1 |
| 1, 4, 5, 12 | 0x7c4ed0, straight line | 1 |
| 2, 8, 10 | none | 0 |
| 3, 6, 7, 14 | 0x7c52c0, turn arc | 1 |
| 9, 13 | 0x7c5180, pitch arc | 1 |
| 11, 15 | 0x7c4fd0, turn and pitch | 1 |
With no handler out is untouched; every caller zeroes it first.
The derivation is in the doc.
Callers 3
- CMovement::IntegrateStep collision
- CMovement::AdvanceLateStart collision
- CMovement::ArmPositionBlend collision
Callees 6
- CMovement::LinearDisplacement collision
- CMovement::IntegrateFacing collision
- CMovement::IntegratePitch collision
- CMovement::TurnPitchDisplacement collision
- CMovement::PitchArcDisplacement collision
- CMovement::TurnArcDisplacement collision
Calls and jumps by a bare address, from tables/calls.tsv.