benilla-re systems structs docs

Script::SetCharacterSelectFacing

function · glue · primitive

Address
0x473670 · 69 bytes, up to 0x4736b4
Signature
int __fastcall (lua_State *L)
Meaning
Sets the select facing from degrees times the f32 0.017453292 and returns its last argument
Confidence
verified, proof one
Name from
the community database (idb)
Finding
glue/select#facing-in-degrees
Test
glue::lua_deg2rad_difftest

Finding: Facing in degrees in glue: character select

The facing is an f32 in radians at 0xb4217c. GetCharacterSelectFacing returns it times the f32 57.29578 (0x803a78, 0x42652ee1) as a double. SetCharacterSelectFacing(degrees) passes f32(degrees × 0.017453292), the f32 0x3c8efa35, the product at 53-bit precision, to 0x4730e0, and returns 1 with nothing pushed: the caller gets its own last argument. 0x4730e0 does nothing until the build counter 0xb42178 is nonzero; then it stores the facing and, with a roster and a selected component model, sets that model's transform to a rotation by the facing about (0, 0, 1), with no translation and scale 1 (0x710650). It never turns the pet.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

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