benilla-re systems structs docs

CInputControl::EmitStrafeAxis

function · input · primitive

Address
0x514e80 · 205 bytes, up to 0x514f4c
Signature
void __thiscall (CInputControl *this, uint32_t time, CGUnit_C *unit)
Meaning
Starts or stops strafing from the strafe bits and, with mouse turn held, the turn bits
Confidence
verified, proof one
Finding
input#the-strafe-axis
Test
input::emit_strafe_axis_difftest

Finding: The strafe axis in input

0x514e80(time, unit) adds up the sideways direction: StrafeLeft (0x40) +1, TurnLeft (0x100) with the mouse turn command (0x1) held +1, StrafeRight (0x80) -1, TurnRight (0x200) with 0x1 held -1. A zero total with the latch bit 0x20000 set stops the strafe (0x60dce0) and clears the latch; with it clear, nothing. A nonzero total first stands the unit up when its stand state is not 0 and clears away-from-keyboard for a player, as the forward axis does; then, only when the latch is clear, it starts a strafe left for a positive total or right for a negative one (0x60dcb0 with 1 or 0) and sets the latch.

The derivation is in the doc.

Callers 1

Callees 4

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