CWorld::SetEntityTransform
function · terrain · orchestration
- Address
0x6709a0· 71 bytes, up to0x6709e6- Signature
void __fastcall (void *entity, NTempest::C3Vector *position, float facing, uint32_t anchor)- Meaning
- Places an entity by its type, snapping its position to the grid first when anchored
- Confidence
- verified, proof one
- Finding
- terrain/entities#entity-transform
Finding: Entity transform in terrain: entity facets
0x6709a0(entity, position, facing, anchor) places a world entity, which is the def itself. A nonzero anchor first runs 0x698110, which can move the position's x and y in place (terrain/doodads#placement-anchor-snap). The type word +0x8 then picks the branch: bit 0x8, a map object def, calls 0x698f50; else bit 0x40, a doodad def, calls 0x698e20; any other entity is left alone. No branch stores the facing. The doodad branch sets the scale +0x30 to 1.0, builds +0xcc as a rotation about z by the facing and then a translation to the position, bounds the def, relinks it and propagates its bounds.
The derivation is in the doc.
Callers 3
- UpdateGroundReticle ui
- MovingTransportHandlerOnTick objectlayer
- TransportHandlerOnTick objectlayer
Callees 3
- AnchorPlacement terrain
- CMapDoodadDef::SetPlacement terrain
- CMapObjDef::SetPlacement terrain
Calls and jumps by a bare address, from tables/calls.tsv.