CMovement
struct · collision · 352 bytes
- Meaning
- Holds a unit's movement: the shared kinematics to +0xab, then collision size, relay timing, event queue and unit
- Confidence
- verified, proof one
- Finding
- collision/mover#construction
Finding: Construction in collision: mover
0x616fa0(position, facing, guid, unit) runs 0x7c4850(position, facing, guid) for +0x00 to
+0xab, then sets the rest of the 352-byte CMovement, which has no vtable, in this order:
| field | value |
|---|---|
+0x13c, +0x148, +0x14c | 0 |
+0xb0 | 0.33333334 (0x3eaaaaab) |
+0xb4 | 2.0277777 (0x4001c71c) |
+0xb8 | 1.0 |
+0x154, +0x158, +0x150 | &+0x154, &+0x154 with bit 0 set, link offset 0 |
+0x15c | unit |
| (call) | 0x7c5a20(0) |
+0xbc to +0xf8 | sixteen −50 |
+0xfc to +0x138 | sixteen 50 |
+0x140 | 50 |
+0x144 is left unset. It returns this.
The derivation is in the doc.
Fields 41
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 8 | void *[2] | m_link | Holds a list link, zeroed by the constructor and unlinked by 0x7c5950 | verified, proof one | collision/kinematics#teardown |
0x0008 | 8 | void *[2] | m_transportLink | Holds the transport passenger link; linked when its second dword is not 0 | inferred | collision/kinematics#teardown |
0x0010 | 12 | float[3] | m_position | Holds the live position, in transport space while a transport GUID is set | verified, proof one | collision/kinematics#anchors-and-elapsed-time |
0x001c | 4 | float | m_facing | Holds the live facing, recomputed from the anchor facing each substep | verified, proof one | collision/kinematics#facing-and-pitch-integration |
0x0020 | 4 | float | m_pitch | Holds the live pitch, recomputed from the anchor pitch and clamped to ±π/2 | verified, proof one | collision/kinematics#facing-and-pitch-integration |
0x0024 | 12 | float[3] | m_upVector | Holds the up vector: (0, 0, 1) at construction, the averaged contact normal after a resolve, rolled by a bank | verified, proof one | collision/resolve#ground-normal-refresh |
0x0030 | 4 | const uint64_t * | m_owner | Holds a pointer to the owner's GUID, passed to the movement notifications | verified, proof one | collision/kinematics#shared-constructor |
0x0038 | 8 | uint64_t | m_transportGuid | Holds the transport GUID; 0 makes the transport transforms the identity | verified, proof one | collision/kinematics#transport-space-transforms |
0x0040 | 4 | uint32_t | m_moveFlags | Holds the movement flags: direction 0xf, turn 0x30, pitch 0xc0, walk 0x100, falling 0x2000, swim 0x00200000 | verified, proof one | collision/kinematics#displacement-dispatcher |
0x0044 | 12 | float[3] | m_anchorPosition | Holds the position the displacement is measured from, copied from +0x10 by 0x7c5cd0 | verified, proof one | collision/kinematics#anchors-and-elapsed-time |
0x0050 | 4 | float | m_anchorFacing | Holds the facing the turn integrates from, copied from +0x1c by 0x7c5cd0 | verified, proof one | collision/kinematics#anchors-and-elapsed-time |
0x0054 | 4 | float | m_anchorPitch | Holds the pitch the pitch integrates from, copied from +0x20 by 0x7c5cd0 | verified, proof one | collision/kinematics#anchors-and-elapsed-time |
0x0058 | 4 | uint32_t | m_anchorElapsed | Holds the milliseconds since the anchors, zeroed by 0x7c5cd0 and added to before each dispatch | verified, proof one | collision/kinematics#anchors-and-elapsed-time |
0x005c | 12 | float[3] | m_direction | Holds the unit travel direction the straight displacement uses | verified, proof one | collision/kinematics#direction-and-heading-basis |
0x0068 | 8 | float[2] | m_headingBasis | Holds the horizontal travel axis: cos and sin of the anchor facing, turned for strafe | verified, proof one | collision/kinematics#direction-and-heading-basis |
0x0070 | 8 | float[2] | m_pitchBasis | Holds cos and sin of the anchor pitch while swimming, else 1 and 0 | verified, proof one | collision/kinematics#direction-and-heading-basis |
0x0078 | 4 | uint32_t | m_fallTime | Holds the milliseconds elapsed on the fall arc, zeroed when an arc starts | verified, proof one | collision/falling#arc-fields-and-constants |
0x007c | 4 | float | m_fallStartZ | Holds the arc start height; the body is D(t) below it | verified, proof one | collision/falling#arc-fields-and-constants |
0x0080 | 4 | float | m_stepBaseZ | Holds the z a step-up probe started from, the base of the climb limit | inferred | collision/walking#step-up-probe |
0x0084 | 4 | float | m_currentSpeed | Holds the current speed, stored by 0x7c5c20 | verified, proof one | collision/kinematics#current-speed-selector |
0x0088 | 4 | float | m_walkSpeed | Holds the walk speed | inferred | collision/kinematics#current-speed-selector |
0x008c | 4 | float | m_runSpeed | Holds the run speed | inferred | collision/kinematics#current-speed-selector |
0x0090 | 4 | float | m_runBackSpeed | Holds the backward run speed | inferred | collision/kinematics#current-speed-selector |
0x0094 | 4 | float | m_swimSpeed | Holds the swim speed | inferred | collision/kinematics#current-speed-selector |
0x0098 | 4 | float | m_swimBackSpeed | Holds the backward swim speed | inferred | collision/kinematics#current-speed-selector |
0x009c | 4 | float | m_turnRate | Holds the turn rate in radians per second, also the pitch rate | verified, proof one | collision/kinematics#turn-and-pitch-rates |
0x00a0 | 4 | float | m_fallStartSpeed | Holds the arc launch speed, down-positive: a jump stores -7.955547 | verified, proof one | collision/falling#arc-fields-and-constants |
0x00a4 | 4 | void * | m_spline | Holds the 0x70-byte spline record 0x630c40 allocates, or null | verified, proof one | collision/commands#spline-commands |
0x00a8 | 4 | uint32_t | m_lastFireTime | Holds the fire time of the last status, seeded with the event time of the first | verified, proof one | collision/status#status-fire-time |
0x00ac | 4 | uint32_t | m_lastSenderStamp | Holds the last sender time stamp, kept only on a forward step and advanced by a skip | verified, proof one | collision/status#status-fire-time |
0x00b0 | 4 | float | m_collisionRadius | Holds half the model width times the scale (0x6174b0); 1/3 at construction | verified, proof one | collision/mover#collision-size |
0x00b4 | 4 | float | m_collisionHeight | Holds the model height times the scale (0x6174b0); 2.0277777 at construction | verified, proof one | collision/mover#collision-size |
0x00b8 | 4 | float | m_scaleRatio | Holds the scale over the display scale, or 1.0 when that is below 2^-22; 1.0 at construction | verified, proof one | collision/mover#collision-size |
0x00bc | 128 | int32_t[32] | m_latenessRing | Holds the last 32 lateness samples 0x618b50 stores, in ms; sixteen -50 then sixteen 50 at construction | verified, proof one | collision/eventapply#lateness-ring |
0x013c | 4 | uint32_t | m_latenessCursor | Holds the ring slot 0x618b50 writes next, advanced modulo 32 | verified, proof one | collision/eventapply#lateness-ring |
0x0140 | 4 | int32_t | m_latenessBase | Holds the ring maximum 0x618c30 stores at each re-base, added to each new sample; 50 at construction | inferred | collision/eventapply#lateness-ring |
0x0144 | 4 | float | m_facingRate | Holds the facing rate in radians per second toward the queue head, from 0x618f80 | verified, proof one | collision/status#facing-rate-toward-the-head |
0x0148 | 4 | float | m_facingRateTime | Holds the seconds to the queue head over which +0x144 applies; 0 turns the rate off | verified, proof one | collision/status#facing-rate-toward-the-head |
0x014c | 4 | int32_t | m_correctionTime | Holds the ms to the queue head at arming, read as int32, the divisor of the position blend; 0 when off | verified, proof one | collision/status#position-blend-arming |
0x0150 | 12 | void *[3] | m_events | Holds the event queue header: link offset, last link, then the first CPlayerMoveEvent | verified, proof one | collision/events#insertion-in-time-order |
0x015c | 4 | void * | m_unit | Holds the unit that owns the mover, the constructor's fourth argument | verified, proof one | collision/mover#construction |