-
Notifications
You must be signed in to change notification settings - Fork 2
/
EngineClient.h
71 lines (68 loc) · 1.85 KB
/
EngineClient.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
/*
Syn's AyyWare Framework 2015
*/
#pragma once
#include "MiscDefinitions.h"
#include "ClientRecvProps.h"
#include "offsets.h"
#include "Vector.h"
// EngineClient
class IVEngineClient
{
public:
void GetScreenSize(int& width, int& height)
{
typedef void(__thiscall * oGetScreenSize)(PVOID, int&, int&);
return call_vfunc< oGetScreenSize >(this, 5)(this, width, height);
}
bool GetPlayerInfo(int ent_num, player_info_t* pinfo)
{
typedef bool(__thiscall * oGetPlayerInfo)(PVOID, int, player_info_t*);
return call_vfunc< oGetPlayerInfo >(this, 8)(this, ent_num, pinfo);
}
int GetLocalPlayer()
{
typedef int(__thiscall * oLocal)(PVOID);
return call_vfunc< oLocal >(this, 12)(this);
}
float Time()
{
typedef float(__thiscall * oTime)(PVOID);
return call_vfunc< oTime >(this, 14)(this);
}
void GetViewAngles(Vector& vAngles)
{
typedef void(__thiscall * oSetViewAngles)(PVOID, Vector&);
return call_vfunc< oSetViewAngles >(this, 18)(this, vAngles);
}
void SetViewAngles(Vector& vAngles)
{
typedef void(__thiscall * oSetViewAngles)(PVOID, Vector&);
return call_vfunc< oSetViewAngles >(this, 19)(this, vAngles);
}
int GetMaxClients()
{
typedef bool(__thiscall * oGetMaxClients)(PVOID);
return call_vfunc< oGetMaxClients >(this, 20)(this);
}
bool IsConnected()
{
typedef bool(__thiscall * oGetScreenSize)(PVOID);
return call_vfunc< oGetScreenSize >(this, 27)(this);
}
bool IsInGame()
{
typedef bool(__thiscall * oLocal)(PVOID);
return call_vfunc< oLocal >(this, 26)(this);
}
const matrix3x4& WorldToScreenMatrix()
{
typedef const matrix3x4& (__thiscall * oWorldToScreenMatrix)(PVOID);
return call_vfunc< oWorldToScreenMatrix >(this, 37)(this);
}
void ClientCmd_Unrestricted(char const* cmd)
{
typedef void(__thiscall * oClientCmdUnres)(PVOID, const char*, char);
return call_vfunc<oClientCmdUnres>(this, 114)(this, cmd, 0);
}
};