benilla-re systems structs docs

BobbingActive

function · uicamera · primitive

Address
0x5105e0 · 166 bytes, up to 0x510685
Signature
uint32_t __thiscall (CCamera *this, CGUnit_C *unit)
Meaning
Returns the camera's bobbing bit when the unit may bob and the camera is near
Confidence
verified, proof one
Finding
uicamera/cvars#bobbing-and-pivot-tests
Test
ui::glue_cvar_gate_seams

Finding: Bobbing and pivot tests in uicamera: the camera CVars

0x5105a0(unit) holds for a unit or player when cameraTerrainTilt is nonzero. 0x5105e0(unit) is the bobbing condition: the camera distance is at most 1/6 yard, the unit is a unit or player, cameraBobbing is nonzero, the unit is not swimming, falling, mounted or on a taxi, the camera's far-sight bit (+0x90 bit 3) is clear, and it returns the camera's bit 9. 0x510690(unit) is the pivot condition: cameraPivot is nonzero, the unit has no forward, backward or strafe bit set, the camera pitch is 0 or less, and it returns the camera's bits 16 and 17.

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.