CGUnit_C::OnMoverStepped
function · objectlayer · primitive
- Address
0x5fac70· 146 bytes, up to0x5fad01- Signature
void __thiscall (CGUnit_C *this, uint32_t time, uint32_t flag)- Meaning
- Refreshes the ground terrain type, hands the liquid depth to the swim decision, then places the object
- Confidence
- verified, proof one
- Finding
- objectlayer/unitbody#liquid-and-swimming
- Test
objectlayer::diff_negate_z
Finding: Liquid and swimming in objectlayer: unit body each frame
After each mover step 0x5fac70 refreshes the ground's terrain type and hands the depth to the
swim decision.
0x60df70 and 0x60dff0 start and stop swimming: the active mover asks, others change at once
or queue the change. Two tests read the depth: deeper than half the unit's height, and a point
just under a surface.
The derivation is in the doc.
Callers 2
- CMovement::AdvanceTo collision
- CMovement::ApplyStatusIfDue collision
Callees 4
- CGUnit_C::UpdateTerrainType objectlayer
- CGUnit_C::UpdateSwimState objectlayer
- CGObject_C::UpdateNode objectlayer
- CWorld::GetEntityLight terrain
Calls and jumps by a bare address, from tables/calls.tsv.