-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSDK.h
559 lines (530 loc) · 18.9 KB
/
SDK.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
#pragma once
#include <windows.h>
#include <math.h>
#include <xstring>
#include "Vector.h"
#include "Vector2.h"
#include "getvfunc.h"
#include "dt_recv2.h"
#include "CSignature.h"
#include "WeaponList.h"
#include "CGlobalVars.h"
#include "VMTHooks.h"
#include "Log.h"
using namespace std;
typedef void* ( __cdecl* CreateInterface_t )( const char*, int* );
typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode);
inline wstring ToWchar(const char* text)
{
size_t length = strlen(text) + 1;
wstring wc(length, L'#');
mbstowcs(&wc[0], text, length);
return wc;
}
#define VMTManager toolkit::VMTManager
#define VMTBaseManager toolkit::VMTBaseManager
#define WIN32_LEAN_AND_MEAN
#pragma optimize("gsy",on)
#pragma warning( disable : 4244 ) //Possible loss of data
typedef float matrix3x4[3][4];
#define me gInts.Engine->GetLocalPlayer()
#define GetBaseEntity gInts.EntList->GetClientEntity
#define MASK_AIMBOT 0x200400B
#define FL_ONGROUND (1<<0)
#define FL_DUCKING (1<<1)
#define CONTENTS_HITBOX 0x40000000
#define FLOW_OUTGOING 0
#define FLOW_INCOMING 1
#define PI 3.14159265358979323846f
#define DEG2RAD( x ) ( ( float )( x ) * ( float )( ( float )( PI ) / 180.0f ) )
#define RAD2DEG( x ) ( ( float )( x ) * ( float )( 180.0f / ( float )( PI ) ) )
#define square( x ) ( x * x )
#define RADPI 57.295779513082f
#define SQUARE( a ) a*a
#define BLU_TEAM 3
#define RED_TEAM 2
typedef struct player_info_s
{
char name[32];
int userID;
char guid[33];
unsigned long friendsID;
char friendsName[32];
bool fakeplayer;
bool ishltv;
unsigned long customFiles[4];
unsigned char filesDownloaded;
} player_info_t;
class ClientClass
{
private:
BYTE _chPadding[8];
public:
char* chName;
RecvTable* Table;
ClientClass* pNextClass;
int iClassID;
};
class CHLClient
{
public:
ClientClass* GetAllClasses( void )
{
typedef ClientClass* ( __thiscall* OriginalFn )( PVOID ); //Anything inside a VTable is a __thiscall unless it completly disregards the thisptr. You can also call them as __stdcalls, but you won't have access to the __thisptr.
return getvfunc<OriginalFn>( this, 8 )( this ); //Return the pointer to the head CClientClass.
}
};
class CGlobals
{
public:
float realtime;
int framecount;
float absoluteframetime;
float curtime;
float frametime;
int maxclients;
int tickcount;
float interval_per_tick;
float interpolation_amount;
};
class CUserCmd
{
public:
virtual ~CUserCmd() {}; //Destructor 0
int command_number; //4
int tick_count; //8
Vector viewangles; //C
float forwardmove; //18
float sidemove; //1C
float upmove; //20
int buttons; //24
byte impulse; //28
int weaponselect; //2C
int weaponsubtype; //30
int random_seed; //34
short mousedx; //38
short mousedy; //3A
bool hasbeenpredicted; //3C;
};
class CBaseEntity
{
public:
Vector& GetAbsOrigin( )
{
typedef Vector& ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>(this, 9)(this);
}
Vector& GetAbsAngles( )
{
typedef Vector& ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>(this, 10)(this);
}
void GetWorldSpaceCenter( Vector& vWorldSpaceCenter)
{
Vector vMin, vMax;
this->GetRenderBounds( vMin, vMax );
vWorldSpaceCenter = this->GetAbsOrigin();
vWorldSpaceCenter.z += (vMin.z + vMax.z) / 2;
}
DWORD* GetModel( )
{
PVOID pRenderable = (PVOID)(this + 0x4);
typedef DWORD* ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( pRenderable, 9 )( pRenderable );
}
bool SetupBones( matrix3x4 *pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime )
{
PVOID pRenderable = (PVOID)(this + 0x4);
typedef bool ( __thiscall* OriginalFn )( PVOID, matrix3x4*, int, int, float );
return getvfunc<OriginalFn>( pRenderable, 16 )( pRenderable, pBoneToWorldOut, nMaxBones, boneMask, currentTime );
}
ClientClass* GetClientClass( )
{
PVOID pNetworkable = (PVOID)(this + 0x8);
typedef ClientClass* ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( pNetworkable, 2 )( pNetworkable );
}
bool IsDormant( )
{
PVOID pNetworkable = (PVOID)(this + 0x8);
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( pNetworkable, 8 )( pNetworkable );
}
int GetIndex( )
{
PVOID pNetworkable = (PVOID)(this + 0x8);
typedef int ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( pNetworkable, 9 )( pNetworkable );
}
void GetRenderBounds( Vector& mins, Vector& maxs )
{
PVOID pRenderable = (PVOID)(this + 0x4);
typedef void ( __thiscall* OriginalFn )( PVOID, Vector& , Vector& );
getvfunc<OriginalFn>( pRenderable, 20 )( pRenderable, mins, maxs );
}
};
class EngineClient
{
public:
void GetScreenSize( int& width, int& height )
{
typedef void ( __thiscall* OriginalFn )( PVOID, int& , int& );
return getvfunc<OriginalFn>( this, 5 )( this, width, height );
}
bool GetPlayerInfo( int ent_num, player_info_t *pinfo )
{
typedef bool ( __thiscall* OriginalFn )( PVOID, int, player_info_t * );
return getvfunc<OriginalFn>(this, 8)(this, ent_num, pinfo );
}
bool Con_IsVisible( void )
{
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 11 )( this );
}
int GetLocalPlayer( void )
{
typedef int ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 12 )( this );
}
float Time( void )
{
typedef float ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 14 )( this );
}
void GetViewAngles( Vector& va )
{
typedef void ( __thiscall* OriginalFn )( PVOID, Vector& va );
return getvfunc<OriginalFn>( this, 19 )( this, va );
}
void SetViewAngles( Vector& va )
{
typedef void ( __thiscall* OriginalFn )( PVOID, Vector& va );
return getvfunc<OriginalFn>( this, 20 )( this, va );
}
int GetMaxClients( void )
{
typedef int ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 21 )( this );
}
bool IsInGame( void )
{
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 26 )( this );
}
bool IsConnected( void )
{
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 27 )( this );
}
bool IsDrawingLoadingImage( void )
{
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 28 )( this );
}
const matrix3x4& WorldToScreenMatrix( void )
{
typedef const matrix3x4& ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>(this, 36)(this);
}
bool IsTakingScreenshot( void )
{
typedef bool ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 85 )( this );
}
DWORD* GetNetChannelInfo( void )
{
typedef DWORD* ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 72 )( this );
}
void ClientCmd_Unrestricted( const char* chCommandString )
{
typedef void ( __thiscall* OriginalFn )( PVOID, const char * );
return getvfunc<OriginalFn>( this, 106 )( this, chCommandString );
}
};
class IPanel
{
public:
const char *GetName(unsigned int vguiPanel)
{
typedef const char* ( __thiscall* OriginalFn )( PVOID, unsigned int );
return getvfunc<OriginalFn>( this, 36 )( this, vguiPanel );
}
void SetMouseInputEnabled(unsigned int panel, bool state)
{
getvfunc<void(__thiscall *)(void*, int, bool)>(this, 32)(this, panel, state);
}
void SetTopmostPopup(unsigned int panel, bool state)
{
getvfunc<void(__thiscall *)(void*, int, bool)>(this, 59)(this, panel, state);
}
};
struct Vertex_t;
class ISurface
{
public:
void DrawSetColor(int r, int g, int b, int a)
{
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
getvfunc<OriginalFn>(this, 11)(this, r, g, b, a);
}
void DrawFilledRect(int x0, int y0, int x1, int y1)
{
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
getvfunc<OriginalFn>(this, 12)(this, x0, y0, x1, y1);
}
void DrawOutlinedRect(int x0, int y0, int x1, int y1)
{
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
getvfunc<OriginalFn>(this, 14)(this, x0, y0, x1, y1);
}
void DrawSetTextFont(unsigned long font)
{
typedef void(__thiscall* OriginalFn)(PVOID, unsigned long);
getvfunc<OriginalFn>(this, 17)(this, font);
}
void DrawSetTextColor(int r, int g, int b, int a)
{
typedef void(__thiscall* OriginalFn)(PVOID, int, int, int, int);
getvfunc<OriginalFn>(this, 19)(this, r, g, b, a);
}
void DrawSetTextPos(int x, int y)
{
typedef void(__thiscall* OriginalFn)(PVOID, int, int);
getvfunc<OriginalFn>(this, 20)(this, x, y);
}
void DrawPrintText(const wchar_t *text, int textLen)
{
typedef void(__thiscall* OriginalFn)(PVOID, const wchar_t *, int, int);
return getvfunc<OriginalFn>(this, 22)(this, text, textLen, 0);
}
unsigned long CreateFont()
{
typedef unsigned int(__thiscall* OriginalFn)(PVOID);
return getvfunc<OriginalFn>(this, 66)(this);
}
void SetFontGlyphSet(unsigned long &font, const char *windowsFontName, int tall, int weight, int blur, int scanlines, int flags)
{
typedef void(__thiscall* OriginalFn)(PVOID, unsigned long, const char*, int, int, int, int, int, int, int);
getvfunc<OriginalFn>(this, 67)(this, font, windowsFontName, tall, weight, blur, scanlines, flags, 0, 0);
}
void GetTextSize(unsigned long font, const wchar_t *text, int &wide, int &tall)
{
typedef void(__thiscall* OriginalFn)(PVOID, unsigned long, const wchar_t *, int&, int&);
getvfunc<OriginalFn>(this, 75)(this, font, text, wide, tall);
}
int CreateNewTextureID(bool procedural = true)
{
typedef int(__thiscall *OriginalFn)(void*, bool);
return getvfunc<OriginalFn>(this, 37)(this, procedural);
}
void DrawSetTextureRGBA(int id, unsigned char const* rgba, int wide, int tall, int hardwareFilter = 0, bool forceReload = 0)
{
typedef void(__thiscall *OriginalFn)(void*, int, unsigned char const*, int, int, int, bool);
return getvfunc<OriginalFn>(this, 31)(this, id, rgba, wide, tall, hardwareFilter, forceReload);
}
void DrawSetTexture(int id)
{
typedef void(__thiscall *OriginalFn)(void*, int);
return getvfunc<OriginalFn>(this, 32)(this, id);
}
bool IsTextureIDValid(int id)
{
typedef bool(__thiscall *OriginalFn)(void*, int);
return getvfunc<OriginalFn>(this, 35)(this, id);
}
void DrawTexturedRect(int x, int y, int width, int height)
{
typedef void(__thiscall *OriginalFn)(void*, int, int, int, int);
return getvfunc<OriginalFn>(this, 34)(this, x, y, width, height);
}
void DrawTexturedPolygon(int n, Vertex_t *vertices, bool bClipVertices = true)
{
typedef void(__thiscall *OriginalFn)(PVOID, int, Vertex_t*, bool);
return getvfunc<OriginalFn>(this, 102)(this, n, vertices, bClipVertices);
}
void DrawLine(int x, int y, int x1, int y1)
{
typedef void(__thiscall *OriginalFn)(void*, int, int, int, int);
return getvfunc<OriginalFn>(this, 15)(this, x, y, x1, y1);
}
void GetCursorPosition(int &x, int &y)
{
return getvfunc<void(__thiscall *)(void*, int &, int &)>(this, 96)(this, x, y);
}
};
class CEntList
{
public:
CBaseEntity* GetClientEntity( int entnum )
{
typedef CBaseEntity* ( __thiscall* OriginalFn )( PVOID, int );
return getvfunc<OriginalFn>( this, 3 )( this, entnum );
}
CBaseEntity* GetClientEntityFromHandle( int hEnt )
{
typedef CBaseEntity* ( __thiscall* OriginalFn )( PVOID, int );
return getvfunc<OriginalFn>( this, 4 )( this, hEnt );
}
int GetHighestEntityIndex(void)
{
typedef int ( __thiscall* OriginalFn )( PVOID );
return getvfunc<OriginalFn>( this, 6 )( this );
}
};
enum playercontrols
{
IN_ATTACK = (1 << 0),
IN_JUMP = (1 << 1),
IN_DUCK = (1 << 2),
IN_FORWARD = (1 << 3),
IN_BACK = (1 << 4),
IN_USE = (1 << 5),
IN_CANCEL = (1 << 6),
IN_LEFT = (1 << 7),
IN_RIGHT = (1 << 8),
IN_MOVELEFT = (1 << 9),
IN_MOVERIGHT = (1 << 10),
IN_ATTACK2 = (1 << 11),
IN_RUN = (1 << 12),
IN_RELOAD = (1 << 13),
IN_ALT1 = (1 << 14),
IN_ALT2 = (1 << 15),
IN_SCORE = (1 << 16), // Used by client.dll for when scoreboard is held down
IN_SPEED = (1 << 17), // Player is holding the speed key
IN_WALK = (1 << 18), // Player holding walk key
IN_ZOOM = (1 << 19), // Zoom key for HUD zoom
IN_WEAPON1 = (1 << 20), // weapon defines these bits
IN_WEAPON2 = (1 << 21), // weapon defines these bits
IN_BULLRUSH = (1 << 22),
};
enum tf_cond
{
TFCond_Slowed = (1 << 0), //Toggled when a player is slowed down.
TFCond_Zoomed = (1 << 1), //Toggled when a player is zoomed.
TFCond_Disguising = (1 << 2), //Toggled when a Spy is disguising.
TFCond_Disguised = (1 << 3), //Toggled when a Spy is disguised.
TFCond_Cloaked = (1 << 4), //Toggled when a Spy is invisible.
TFCond_Ubercharged = (1 << 5), //Toggled when a player is ÜberCharged.
TFCond_TeleportedGlow = (1 << 6), //Toggled when someone leaves a teleporter and has glow beneath their feet.
TFCond_Taunting = (1 << 7), //Toggled when a player is taunting.
TFCond_UberchargeFading = (1 << 8), //Toggled when the ÜberCharge is fading.
TFCond_CloakFlicker = (1 << 9), //Toggled when a Spy is visible during cloak.
TFCond_Teleporting = (1 << 10), //Only activates for a brief second when the player is being teleported; not very useful.
TFCond_Kritzkrieged = (1 << 11), //Toggled when a player is being crit buffed by the KritzKrieg.
TFCond_TmpDamageBonus = (1 << 12), //Unknown what this is for. Name taken from the AlliedModders SDK.
TFCond_DeadRingered = (1 << 13), //Toggled when a player is taking reduced damage from the Deadringer.
TFCond_Bonked = (1 << 14), //Toggled when a player is under the effects of The Bonk! Atomic Punch.
TFCond_Stunned = (1 << 15), //Toggled when a player's speed is reduced from airblast or a Sandman ball.
TFCond_Buffed = (1 << 16), //Toggled when a player is within range of an activated Buff Banner.
TFCond_Charging = (1 << 17), //Toggled when a Demoman charges with the shield.
TFCond_DemoBuff = (1 << 18), //Toggled when a Demoman has heads from the Eyelander.
TFCond_CritCola = (1 << 19), //Toggled when the player is under the effect of The Crit-a-Cola.
TFCond_InHealRadius = (1 << 20), //Unused condition, name taken from AlliedModders SDK.
TFCond_Healing = (1 << 21), //Toggled when someone is being healed by a medic or a dispenser.
TFCond_OnFire = (1 << 22), //Toggled when a player is on fire.
TFCond_Overhealed = (1 << 23), //Toggled when a player has >100% health.
TFCond_Jarated = (1 << 24), //Toggled when a player is hit with a Sniper's Jarate.
TFCond_Bleeding = (1 << 25), //Toggled when a player is taking bleeding damage.
TFCond_DefenseBuffed = (1 << 26), //Toggled when a player is within range of an activated Battalion's Backup.
TFCond_Milked = (1 << 27), //Player was hit with a jar of Mad Milk.
TFCond_MegaHeal = (1 << 28), //Player is under the effect of Quick-Fix charge.
TFCond_RegenBuffed = (1 << 29), //Toggled when a player is within a Concheror's range.
TFCond_MarkedForDeath = (1 << 30), //Player is marked for death by a Fan O'War hit. Effects are similar to TFCond_Jarated.
TFCond_NoHealingDamageBuff = (1 << 31), //Unknown what this is used for.
TFCondEx_SpeedBuffAlly = (1 << 0), //Toggled when a player gets hit with the disciplinary action.
TFCondEx_HalloweenCritCandy = (1 << 1), //Only for Scream Fortress event maps that drop crit candy.
TFCondEx_CritCanteen = (1 << 2), //Player is getting a crit boost from a MVM canteen.
TFCondEx_CritDemoCharge = (1 << 3), //From demo's shield
TFCondEx_CritHype = (1 << 4), //Soda Popper crits.
TFCondEx_CritOnFirstBlood = (1 << 5), //Arena first blood crit buff.
TFCondEx_CritOnWin = (1 << 6), //End of round crits.
TFCondEx_CritOnFlagCapture = (1 << 7), //CTF intelligence capture crits.
TFCondEx_CritOnKill = (1 << 8), //Unknown what this is for.
TFCondEx_RestrictToMelee = (1 << 9), //Unknown what this is for.
TFCondEx_DefenseBuffNoCritBlock = ( 1 << 10 ), //MvM Buff.
TFCondEx_Reprogrammed = (1 << 11), //MvM Bot has been reprogrammed.
TFCondEx_PyroCrits = (1 << 12), //Player is getting crits from the Mmmph charge.
TFCondEx_PyroHeal = (1 << 13), //Player is being healed from the Mmmph charge.
TFCondEx_FocusBuff = (1 << 14), //Player is getting a focus buff.
TFCondEx_DisguisedRemoved = (1 << 15), //Disguised remove from a bot.
TFCondEx_MarkedForDeathSilent = (1 << 16), //Player is under the effects of the Escape Plan/Equalizer or GRU.
TFCondEx_DisguisedAsDispenser = (1 << 17), //Bot is disguised as dispenser.
TFCondEx_Sapped = (1 << 18), //MvM bot is being sapped.
TFCondEx_UberchargedHidden = (1 << 19), //MvM Related
TFCondEx_UberchargedCanteen = (1 << 20), //Player is receiving ÜberCharge from a canteen.
TFCondEx_HalloweenBombHead = (1 << 21), //Player has a bomb on their head from Merasmus.
TFCondEx_HalloweenThriller = (1 << 22), //Players are forced to dance from Merasmus.
TFCondEx_BulletCharge = (1 << 26), //Player is receiving 75% reduced damage from bullets.
TFCondEx_ExplosiveCharge = (1 << 27), //Player is receiving 75% reduced damage from explosives.
TFCondEx_FireCharge = (1 << 28), //Player is receiving 75% reduced damage from fire.
TFCondEx_BulletResistance = (1 << 29), //Player is receiving 10% reduced damage from bullets.
TFCondEx_ExplosiveResistance = (1 << 30), //Player is receiving 10% reduced damage from explosives.
TFCondEx_FireResistance = (1 << 31), //Player is receiving 10% reduced damage from fire.
TFCondEx2_Stealthed = (1 << 0),
TFCondEx2_MedigunDebuff = (1 << 1),
TFCondEx2_StealthedUserBuffFade = (1 << 2),
TFCondEx2_BulletImmune = (1 << 3),
TFCondEx2_BlastImmune = (1 << 4),
TFCondEx2_FireImmune = (1 << 5),
TFCondEx2_PreventDeath = (1 << 6),
TFCondEx2_MVMBotRadiowave = (1 << 7),
TFCondEx2_HalloweenSpeedBoost = (1 << 8), //Wheel has granted player speed boost.
TFCondEx2_HalloweenQuickHeal = (1 << 9), //Wheel has granted player quick heal.
TFCondEx2_HalloweenGiant = (1 << 10), //Wheel has granted player giant mode.
TFCondEx2_HalloweenTiny = (1 << 11), //Wheel has granted player tiny mode.
TFCondEx2_HalloweenInHell = (1 << 12), //Wheel has granted player in hell mode.
TFCondEx2_HalloweenGhostMode = (1 << 13), //Wheel has granted player ghost mode.
TFCondEx2_Parachute = (1 << 16), //Player has deployed the BASE Jumper.
TFCondEx2_BlastJumping = (1 << 17), //Player has sticky or rocket jumped.
TFCond_MiniCrits = ( TFCond_Buffed | TFCond_CritCola ),
TFCond_IgnoreStates = ( TFCond_Ubercharged | TFCond_Bonked ),
TFCondEx_IgnoreStates = ( TFCondEx_PyroHeal )
};
enum tf_classes
{
TF2_Scout = 1,
TF2_Soldier = 3,
TF2_Pyro = 7,
TF2_Demoman = 4,
TF2_Heavy = 6,
TF2_Engineer = 9,
TF2_Medic = 5,
TF2_Sniper = 2,
TF2_Spy = 8,
};
enum source_lifestates
{
LIFE_ALIVE,
LIFE_DYING,
LIFE_DEAD,
LIFE_RESPAWNABLE,
LIFE_DISCARDBODY,
};
class ClientModeShared
{
public:
bool IsChatPanelOutOfFocus(void)
{
typedef PVOID(__thiscall* OriginalFn)(PVOID);
PVOID CHudChat = getvfunc<OriginalFn>(this, 19)(this);
if (CHudChat)
{
return *(PFLOAT)((DWORD)CHudChat + 0xFC) == 0;
}
return false;
}
};
class CInterfaces
{
public:
CEntList* EntList;
EngineClient* Engine;
IPanel* Panels;
ISurface* Surface;
ClientModeShared* ClientMode;
CHLClient* Client;
};
extern CInterfaces gInts;
extern CPlayerVariables gPlayerVars;
extern COffsets gOffsets;