CMovement::SetTurnRate
function · collision · primitive
- Address
0x7c6ff0· 58 bytes, up to0x7c7029- Signature
uint32_t __thiscall (CMovement *this, float rate)- Meaning
- Stores +0x9c and re-anchors when the new rate differs by 2^-22 or more; returns 1 then
- Confidence
- verified, proof one
- Finding
- collision/commands#speed-and-run-mode-setters
- Test
collision::move_setters_difftest
Finding: Speed and run-mode setters in collision: commands
Five setters store a speed and one the turn rate, each only when the new value differs from the
field by 2⁻²² or more, or is NaN; they return 1 then and 0 otherwise. All re-anchor; the speed
setters also update the current speed, which while falling keeps its value. The fields are named
from their use in 0x7c4c90 and 0x7c5c50:
| setter | field |
|---|---|
0x7c70d0 | +0x88 walk |
0x7c7030 | +0x8c run |
0x7c7080 | +0x90 run back |
0x7c7120 | +0x94 swim |
0x7c7170 | +0x98 swim back |
0x7c6ff0 | +0x9c turn rate, no speed update |
0x7c71c0(run) clears the walk bit 0x100 for a nonzero argument and sets it for zero, then
re-anchors and updates the speed.
The derivation is in the doc.
Callers 4
- CMovement::UpdatePlayerMovement collision
- CMovement::DispatchFlushedEvent collision
- CMovement::SetTurnRateNow collision
- CMovement::OnTurnRate collision
Callees 1
- CMovement::UpdateAnchors collision
Calls and jumps by a bare address, from tables/calls.tsv.