-
Notifications
You must be signed in to change notification settings - Fork 5
/
ClientRecvProps.h
87 lines (77 loc) · 1.49 KB
/
ClientRecvProps.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
// Credits to Valve and Shad0w
#pragma once
struct RecvProp;
namespace SourceEngine
{
enum class SendPropType
{
DPT_Int = 0,
DPT_Float,
DPT_Vector,
DPT_VectorXY, // Only encodes the XY of a vector, ignores Z
DPT_String,
DPT_Array, // An array of the base types (can't be of datatables).
DPT_DataTable,
DPT_Int64,
DPT_NUMSendPropTypes
};
};
class DVariant
{
public:
union
{
float m_Float;
long m_Int;
char *m_pString;
void *m_pData;
float m_Vector[3];
};
};
class CRecvProxyData
{
public:
const RecvProp *m_pRecvProp;
char _pad[4];//csgo ( for l4d keep it commented out :) )
DVariant m_Value;
int m_iElement;
int m_ObjectID;
};
typedef void(*RecvVarProxyFn)(const CRecvProxyData *pData, void *pStruct, void *pOut);
struct RecvTable
{
RecvProp *m_pProps;
int m_nProps;
void *m_pDecoder;
char *m_pNetTableName;
bool m_bInitialized;
bool m_bInMainList;
};
struct RecvProp
{
char *m_pVarName;
int m_RecvType;
int m_Flags;
int m_StringBufferSize;
bool m_bInsideArray;
const void *m_pExtraData;
RecvProp *m_pArrayProp;
void* m_ArrayLengthProxy;
void* m_ProxyFn;
void* m_DataTableProxyFn;
RecvTable *m_pDataTable;
int m_Offset;
int m_ElementStride;
int m_nElements;
const char *m_pParentArrayPropName;
};
class ClientClass
{
public:
void* m_pCreateFn;
void* m_pCreateEventFn;
char *m_pNetworkName;
RecvTable *m_pRecvTable;
ClientClass *m_pNext;
int m_ClassID;
};