CWorld::GetEntityTerrainType
function · terrain · orchestration
- Address
0x6706d0· 29 bytes, up to0x6706ec- Signature
uint32_t __fastcall (void *object, uint32_t *out)- Meaning
- Stores an entity's TerrainType id +0xdc through edx and returns 1; returns 0 for -1 or a null object
- Confidence
- verified, proof one
- Finding
- terrain/mapentities#ground-id-outcomes
Finding: Ground id outcomes in terrain: map entities
0x6a8a20 ends by storing a ground id at +0xdc of the entity, when [+8] & 0x20 is set. The id
starts at −1. A map object hit gives the face's terrain type (0x6a26c0), which is 0 (Dirt) for a
material that carries 0: only −1 is the silent value. It stays −1 when the winning group has no
face the material trace accepts or the group is not loaded. A terrain hit gives the dominant
layer's terrain type, and −1 when 0x69b1c0 fails. 0x6706d0 hands on every id but −1. A unit
copies it to +0xc60: 0x5fa730 falls back to −1 with no entity or no id, 0x5fba95 keeps the old
value on failure.
The derivation is in the doc.
Callers 2
- CGUnit_C::UpdateTerrainType objectlayer
- CGUnit_C::PostInit objectlayer
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.