Skip to content

Types#

Defined in Types.hpp. Core data types used throughout the SDK.

Vector2#

2D vector for screen coordinates and similar.

struct Vector2
{
    float x = 0.f;
    float y = 0.f;
};

Constructors#

Signature Description
Vector2() Default constructor, {0, 0}
Vector2(float x, float y) Initialize with values

Operators#

Operator Description
Vector2 + Vector2 Component-wise addition
Vector2 - Vector2 Component-wise subtraction
Vector2 * float Scalar multiplication
Vector2 / float Scalar division

Methods#

IsValid#

bool IsValid() const;

Returns true if either x or y is non-zero.

Length#

float Length() const;

Returns the Euclidean length: sqrt(x*x + y*y).

LengthSquared#

float LengthSquared() const;

Returns x*x + y*y. Faster than Length() when you only need to compare distances.

Normalized#

Vector2 Normalized() const;

Returns a unit-length vector in the same direction. Returns {0, 0} if length is zero.


Vector3#

3D vector for world positions, velocities, and rotations.

struct Vector3
{
    float x = 0.f;
    float y = 0.f;
    float z = 0.f;
};

Constructors#

Signature Description
Vector3() Default constructor, {0, 0, 0}
Vector3(float x, float y, float z) Initialize with values

Operators#

Operator Description
Vector3 + Vector3 Component-wise addition
Vector3 - Vector3 Component-wise subtraction
Vector3 * float Scalar multiplication
Vector3 / float Scalar division

Methods#

IsValid#

bool IsValid() const;

Returns true if any component is non-zero.

Length#

float Length() const;

Returns the Euclidean length: sqrt(x*x + y*y + z*z).

LengthSquared#

float LengthSquared() const;

Returns x*x + y*y + z*z.

Normalized#

Vector3 Normalized() const;

Returns a unit-length vector. Returns {0, 0, 0} if length is zero.

Dot#

float Dot(const Vector3& other) const;

Returns the dot product: x*other.x + y*other.y + z*other.z.

Cross#

Vector3 Cross(const Vector3& other) const;

Returns the cross product of this vector and other.

RotatedY#

Vector3 RotatedY(float yaw) const;

Returns this vector rotated around the Y axis by yaw radians. Useful for converting local-space offsets (like bounding box corners) into world-space using the entity's yaw.

Vector3 localCorner(1, 0, 2);
Vector3 worldCorner = rootPos + localCorner.RotatedY(entity.GetYaw());

Color#

ARGB color stored as a uint32_t in 0xAARRGGBB format.

struct Color
{
    uint32_t value = 0xFFFFFFFF;
};

Constructors#

Signature Description
Color() Default: white (0xFFFFFFFF)
Color(uint32_t argb) From raw ARGB value
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) From RGBA components

Channel Accessors#

Method Returns
A() Alpha channel (0-255)
R() Red channel (0-255)
G() Green channel (0-255)
B() Blue channel (0-255)

Methods#

WithAlpha#

Color WithAlpha(uint8_t a) const;

Returns a copy of this color with a different alpha value.

Color semiRed = Color::Red().WithAlpha(128);

Lerp#

static Color Color::Lerp(Color a, Color b, float t);

Linearly interpolates between two colors. t is clamped to [0, 1].

Color mid = Color::Lerp(Color::Red(), Color::Blue(), 0.5f);

HealthGradient#

static Color Color::HealthGradient(float percent, uint8_t alpha = 255);

Returns a health-based color: red at 0%, yellow at 50%, green at 100%. percent is 0.0 to 1.0.

Color hp = Color::HealthGradient(0.75f);       // yellowish-green
Color hp2 = Color::HealthGradient(0.3f, 200);  // reddish-orange, alpha 200

Static Colors#

Method Value
Color::Red() (255, 0, 0)
Color::Green() (0, 255, 0)
Color::Blue() (0, 0, 255)
Color::White() (255, 255, 255)
Color::Black() (0, 0, 0)
Color::Yellow() (255, 255, 0)
Color::Cyan() (0, 255, 255)
Color::Magenta() (255, 0, 255)
Color::Orange() (255, 165, 0)
Color::Purple() (128, 0, 128)
Color::Transparent() (0, 0, 0, 0)

Team#

enum class Team : int32_t
{
    Unknown   = 0,
    Red       = 1,
    Blue      = 2,
    Unknown1  = 3,
    Unknown2  = 4,
    Deathmatch = 5
};

Access via Entity::GetTeam().


EntityType#

enum class EntityType : int32_t
{
    Hero      = 0,
    Turret    = 1,
    Throwable = 2,
    Shield    = 3,
    Bot       = 4,
    Misc      = 5,
    Unknown   = 6
};

Access via Entity::GetEntityType().


BodySlot#

Body region classification constants used in Hitbox::bodySlot. Defined in Types.hpp.

namespace BodySlot
{
    constexpr int Head      = 0;
    constexpr int Neck      = 1;
    constexpr int Body      = 2;
    constexpr int BodyBot   = 3;
    constexpr int Pelvis    = 4;
    constexpr int LPelvis   = 5;
    constexpr int RPelvis   = 6;
    constexpr int Chest     = 7;
    constexpr int LShoulder = 8;
    constexpr int RShoulder = 9;
    constexpr int LElbow    = 10;
    constexpr int RElbow    = 11;
    constexpr int LAnkle    = 12;
    constexpr int RAnkle    = 13;
    constexpr int LShank    = 14;
    constexpr int RShank    = 15;
    constexpr int LHand     = 16;
    constexpr int RHand     = 17;
    constexpr int RKnee     = 18;
    constexpr int LKnee     = 19;
    constexpr int RFoot     = 20;
    constexpr int LFoot     = 21;
    constexpr int Count     = 22;
    constexpr int Unclassified = -1;
}

A hitbox with bodySlot == BodySlot::Unclassified (-1) has not been classified into a specific body region.

Use BodySlot::Head to filter for headshot-eligible hitboxes:

Hitbox hitboxes[32];
int count = enemy.GetHitboxes(hitboxes, 32);
for (int i = 0; i < count; ++i)
{
    if (hitboxes[i].bodySlot == BodySlot::Head)
    {
        // This hitbox is on the head
        Vector2 screen;
        if (WorldToScreen(hitboxes[i].worldPos, screen))
            Draw::CircleFilled(screen, 5.f, Color::Red());
    }
}