benilla-re systems structs docs

CWorld::SetEntityCallback

function · terrain · orchestration

Address
0x670a30 · 60 bytes, up to 0x670a6b
Signature
void __fastcall (void *entity, void *callback, void *arg1, void *arg2)
Meaning
Sets a done callback on an entity's doodad models by its type
Confidence
verified, proof one
Finding
terrain/entities#entity-done-callback

Finding: Entity done callback in terrain: entity facets

0x670a30(entity, callback, arg1, arg2) sets the done callback of an entity's doodad models. A map object def (bit 0x8) passes the three to 0x6a2500, which passes them through 0x6a2150 to every doodad def with a model in every group def's list; a doodad def (bit 0x40) with a model takes them directly. 0x711bb0 stores the callback at the model's +0x70 and the arguments at +0x78 and +0x7c, replacing the doodad's own 0x6951b0 and its arguments 0, 0 (0x695137, 0x695139); nothing keeps the old pair. The def goes only to 0x7133a0 and 0x7134b0. Any other entity does nothing. Its three callers pass 0x5f49b0 with 0 and 0.

The derivation is in the doc.

Callers 3

Callees 2

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