MayTurn
function · input · primitive
- Address
0x5145b0· 47 bytes, up to0x5145de- Meaning
- Returns whether the driven unit is not stunned: controllable and flag 0x40000 clear
- Confidence
- verified, proof one
- Finding
- input#may-it-move-may-it-turn
Finding: May it move, may it turn in input
0x5144e0(unit) is the precondition of both: the unit exists, UNIT_FIELD_HEALTH is above 0 (signed), its movement object's auxiliary record (+0xa4) is absent or has bit 0x4 at +0x18, it is not in a current animation whose AnimationData word (column 3) has bit 0x80 (the knockdown lockout, 0x60f5b0), and it is not the active player with far sight engaged (+0x1c70 bit 0).
0x514560 adds that the movement flags (+0x40 of the movement object) have none of 0x1200 and the stand state is not 7. 0x5145b0 adds that UNIT_FIELD_FLAGS has bit 0x40000 clear. A dead unit therefore fails both: it neither moves nor turns.
The derivation is in the doc.
Callers 3
- MayMouseTurn input
- CInputControl::Tick input
- CGUnit_C::Tick objectlayer
Callees 1
- CanControlUnit input
Calls and jumps by a bare address, from tables/calls.tsv.