Skip to content

PluginEntity Layout#

The PluginEntity struct is packed (#pragma pack(push, 1)) and matches the host's binary layout. The Entity class wraps this struct — you don't normally access it directly.

Byte Layout#

Offset Size Type Field
0 4 uint32_t id
4 8 uint64_t heroId
12 4 uint32_t entityType
16 4 uint32_t team
20 12 Vector3 position
32 12 Vector3 velocity
44 12 Vector3 rotation
56 4 float health
60 4 float maxHealth
64 4 float armor
68 4 float barrier
72 1 uint8_t alive
73 1 uint8_t visible
74 1 uint8_t isLocalPlayer
75 1 uint8_t isInvulnerable
76 4 float ultCharge
80 1 uint8_t ultActive
81 8 Vector2 skill1Active
89 8 Vector2 skill2Active
97 8 Vector2 skill3Active
105 12 Vector3 delta1
117 12 Vector3 delta2
129 4 float nametagYPos
133 4 float overhealth
137 1 uint8_t hitboxCount
138 1 uint8_t isTargetable
139 1 uint8_t isReloading
140 1 uint8_t ultChargeStatus
141 12 Vector3 forward
153 12 PluginCooldown skill1Cd
165 12 PluginCooldown skill1Duration
177 12 PluginCooldown skill2Cd
189 12 PluginCooldown skill2Duration
201 12 PluginCooldown skill3Cd
213 12 PluginCooldown skill3Duration
225 12 PluginCooldown ultCd

Total size: 237 bytes. forward begins at byte 141. Host and SDK headers enforce both values with compile-time assertions.

Field Details#

Identity#

Field Description
id Unique entity ID
heroId Hero pool ID (compare with HeroId:: constants)
entityType See EntityType enum (Hero, Turret, Bot, etc.)
team See Team enum (Red, Blue, Deathmatch, etc.)

Spatial#

Field Description
position Root (feet) world position
velocity Movement velocity vector
rotation Model/body yaw in .x; .y and .z are zero. This is not command yaw or rendered-camera rotation.
forward Normalized local command direction for the local entity; normalized model/body facing for remote entities. Zero means unavailable.

Health#

Field Description
health Current health
maxHealth Maximum health
armor Current armor
barrier Current barrier (shields)

State Flags#

Field Description
alive 1 if alive, 0 if dead
visible 1 if visible (not occluded), 0 if behind a wall
isLocalPlayer 1 if this is the local player
isInvulnerable 1 if currently invulnerable

Abilities#

Field Description
ultCharge Ultimate charge percentage (0.0 - 100.0), populated for all hero entities
ultChargeStatus CooldownStatus; check before treating ultCharge == 0 as a real sample
ultActive 1 if ultimate is currently active
skill1Active .x = 1.0 if Skill 1 (Shift) active, 0.0 otherwise
skill2Active .x = 1.0 if Skill 2 (E) active, 0.0 otherwise
skill3Active .x = 1.0 if Skill 3 active, 0.0 otherwise
skill1Cd, skill2Cd Per-entity Shift/E cooldown state; check status
skill3Cd, ultCd Reserved legacy fields; currently Unsupported
skill1Duration, skill2Duration, skill3Duration Per-entity active-duration state

Bounds#

Field Description
delta1 AABB minimum in local space
delta2 AABB maximum in local space
nametagYPos Y position offset for the entity's nametag

Struct Definition#

#pragma pack(push, 1)
struct PluginCooldown
{
    float current;
    float max;
    uint8_t enabled;
    uint8_t status;
    uint8_t _pad[2];
};

struct PluginEntity
{
    uint32_t id;
    uint64_t heroId;
    uint32_t entityType;
    uint32_t team;
    Vector3 position;
    Vector3 velocity;
    Vector3 rotation;
    float health;
    float maxHealth;
    float armor;
    float barrier;
    uint8_t alive;
    uint8_t visible;
    uint8_t isLocalPlayer;
    uint8_t isInvulnerable;
    float ultCharge;
    uint8_t ultActive;
    Vector2 skill1Active;
    Vector2 skill2Active;
    Vector2 skill3Active;
    Vector3 delta1;     // AABB min (local space)
    Vector3 delta2;     // AABB max (local space)
    float nametagYPos;

    float overhealth;
    uint8_t hitboxCount;
    uint8_t isTargetable;
    uint8_t isReloading;
    uint8_t ultChargeStatus;
    Vector3 forward;

    PluginCooldown skill1Cd;
    PluginCooldown skill1Duration;
    PluginCooldown skill2Cd;
    PluginCooldown skill2Duration;
    PluginCooldown skill3Cd;
    PluginCooldown skill3Duration;
    PluginCooldown ultCd;
};
#pragma pack(pop)

See Also#