Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // by imGol2den
- // credit to ryan and blackhacks
- typedef struct Vector3
- {
- FLOAT x, y, z;
- Vector3()
- { x = 0; y = 0; z = 0; }
- Vector3(FLOAT x, FLOAT y, FLOAT z)
- { this->x = x; this->y = y; this->z = z; }
- BOOL operator== (Vector3 &Vector)
- { return (this->x == Vector.x && this->y == Vector.y && this->z == Vector.z); }
- Vector3& operator+ (Vector3 &Vector)
- { return Vector3(this->x + Vector.x, this->y + Vector.y, this->z + Vector.z); }
- Vector3& operator- (Vector3 &Vector)
- { return Vector3(this->x - Vector.x, this->y - Vector.y, this->z - Vector.z); }
- FLOAT Distance(Vector3 &Vector)
- { return sqrt(DistanceEx(Vector)); }
- FLOAT DistanceEx(Vector3 &Vector)
- {
- FLOAT _x = this->x - Vector.x, _y = this->y - Vector.y, _z = this->z - Vector.z;
- return ((_x * _x) + (_y * _y) + (_z * _z));
- }
- FLOAT Dot(Vector3 &Other)
- { return (this->x * Other.x) + (this->y * Other.y) + (this->z * Other.z); }
- Vector3 &RoundHalfUp()
- { return Vector3(floor(this->x + 0.5), floor(this->y + 0.5), floor(this->z + 0.5)); }\
- Vector3 &RoundHalfDown()
- { return Vector3(floor(this->x + 0.5), floor(this->y + 0.5), floor(this->z + 0.5)); }
- } Vector3, *PVector3;
- typedef struct Vector2
- {
- FLOAT x, y;
- Vector2()
- { x = y = 0; }
- Vector2(FLOAT x, FLOAT y)
- { this->x = x; this->y = y; }
- } Vector2, *PVector2;
- typedef struct cgs_t
- {
- BYTE _0x0000[36];
- BYTE Gametype[32]; // 0x0024
- CHAR HostName[260]; // 0x0044
- DWORD MaxClients; // 0x0148
- DWORD PrivateClients; // 0x014C
- CHAR Mapname[64]; // 0x0150
- BYTE _0x0190[54100];
- } cgs_t, *pcgs_t; // size 0xD4E4
- typedef struct usercmd_s
- {
- DWORD ServerTime; // 0x0000
- DWORD Buttons; // 0x0004
- DWORD ViewAngles[3]; // 0x0008
- CHAR _0x0014[48];
- } usercmd_s, *pusercmd_s; // size 0x44
- typedef struct clientActive_t
- {
- BYTE _0x0000[248];
- Vector3 Origin; // 0x00F8
- BYTE _0x0104[12];
- Vector3 SpawnAngles; // 0x0110
- BYTE _0x011C[15436];
- Vector3 ViewAngles; // 0x3D68
- usercmd_s UserCommands[128]; // 0x3D74
- DWORD CommandNumber; // 0x5F74
- BYTE _0x5F78[42184];
- inline DWORD GetUserCommandNumber()
- {
- return CommandNumber & 0x7F;
- }
- inline pusercmd_s GetUserCommand(DWORD CommandNumber = -1)
- {
- if(CommandNumber == -1) { return &UserCommands[this->CommandNumber & 0x7F]; }
- return &UserCommands[CommandNumber]; // # r10 = r11 & 0x7F
- }
- } clientActive_t, *pclientActive_t; // size 0x10440
- typedef struct centity_s
- {
- BYTE _0x0000[20];
- Vector3 Origin; // 0x0014
- Vector3 Angles; // 0x0020
- BYTE _0x002C[431];
- BYTE State; // 0x01DB
- BYTE _0x01DC[48];
- } centity_s, *pcentity_s; // size 0x020C
- typedef struct clientInfo_t
- {
- BYTE _0x0000[12];
- DWORD Team; // 0x000C
- BYTE _0x0010[3108];
- } clientInfo_t, *pclientInfo_t; // size 0x0C34
- typedef struct cg_s
- {
- BYTE ClientNumber; // 0x0000
- BYTE _0x0000[75];
- DWORD ServerTime; // 0x004C
- BYTE _0x0050[10];
- WORD PlayerStance; // 0x005A
- BYTE _0x005C[28];
- Vector3 Origin; // 0x0078
- Vector3 Velocity; // 0x0084
- BYTE _0x0090[344];
- DWORD Health; // 0x01E8
- BYTE _0x01EC[661324];
- clientInfo_t clientInfo[18]; // 0xA1938
- BYTE _0xAF4E0[71200];
- } cg_s, *pcg_s; // size 0xC0B00
Advertisement
Add Comment
Please, Sign In to add comment