Types#
Defined in Types.hpp. Core data types used throughout the SDK.
Vector2#
2D vector for screen coordinates and similar.
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#
Returns true if either x or y is non-zero.
Length#
Returns the Euclidean length: sqrt(x*x + y*y).
LengthSquared#
Returns x*x + y*y. Faster than Length() when you only need to compare distances.
Normalized#
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.
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#
Returns true if any component is non-zero.
Length#
Returns the Euclidean length: sqrt(x*x + y*y + z*z).
LengthSquared#
Returns x*x + y*y + z*z.
Normalized#
Returns a unit-length vector. Returns {0, 0, 0} if length is zero.
Dot#
Returns the dot product: x*other.x + y*other.y + z*other.z.
Cross#
Returns the cross product of this vector and other.
RotatedY#
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.
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#
Returns a copy of this color with a different alpha value.
Lerp#
Linearly interpolates between two colors. t is clamped to [0, 1].
HealthGradient#
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: