benilla-re systems structs docs

s_playerCommandsVtable

global · unassigned

Address
0x7ff9dc · 8 bytes, up to 0x7ff9e3
Type
void *[2]
Meaning
Holds the player commands module vtable: register 0x4049e0, unregister 0x405390
Confidence
verified, proof one
Finding
console/commands#player-command-lifetime

Finding: Player command lifetime in console: commands

ClientInitializeGame (0x401570) registers port, worldport, setrawpos (category 0), showplayer (1), togglehelm and togglecloak (4), none with a help line, and ClientDestroyGame (0x401ee0) removes them. It makes a 4-byte module object with the vtable 0x7ff9dc, appends it to the holder list 0x8827c8 and calls slot 0, RegisterPlayerCommands (0x4049e0), after the object, movement and interface initializers and before the map opens. The game flag 0x882734 is set last. ClientDestroyGame returns at once while the flag is clear; otherwise it calls slot 1, UnregisterPlayerCommands (0x405390), of every listed module, which unregisters all six names, then frees the modules. Outside that span the names are not registered: each occurs only in those two functions. whois has the same lifetime (0x5adc50, 0x5ae2d0).

The derivation is in the doc.