forked from alliedmodders/hl2sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serversideclient.h
78 lines (71 loc) · 2.62 KB
/
serversideclient.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
#ifndef SERVERSIDECLIENT_H
#define SERVERSIDECLIENT_H
#if COMPILER_MSVC
#pragma once
#endif
#include "inetchannel.h"
#include "playerslot.h"
#include "playeruserid.h"
#include "protocol.h"
#include "entity2/entityidentity.h"
#include "steam/steamclientpublic.h"
#include "tier0/utlstring.h"
// class CServerSideClientBase: CUtlSlot, INetworkChannelNotify, INetworkMessageProcessingPreFilter;
#pragma pack(push,1)
class CServerSideClientBase
{
virtual ~CServerSideClientBase() = 0;
public:
INetChannel* GetNetChannel() const { return m_NetChannel; };
CPlayerSlot GetPlayerSlot() const { return m_nClientSlot; };
CEntityIndex GetEntityIndex() const { return m_nEntityIndex; };
CPlayerUserId GetUserID() const { return m_UserID; };
int GetSignonState() const { return m_nSignonState; }
CSteamID GetClientSteamID() const { return m_SteamID; }
const char* GetClientName() const { return m_Name; };
bool IsConnected() const { return m_nSignonState >= SIGNONSTATE_CONNECTED; };
bool IsSpawned() const { return m_nSignonState >= SIGNONSTATE_NEW; };
bool IsActive() const { return m_nSignonState == SIGNONSTATE_FULL; };
bool IsFakeClient() const { return m_bFakePlayer; };
bool IsHLTV() const { return m_bIsHLTV; }
bool IsFullyAuthenticated() { return m_bFullyAuthenticated; }
const netadr_t* GetRemoteAddress() const { return &m_NetAdr0; }
void ForceFullUpdate() { m_nForceWaitForTick = -1; }
private:
[[maybe_unused]] void* m_pVT1; // INetworkMessageProcessingPreFilter
[[maybe_unused]] char pad1[0x30];
#ifdef __linux__
[[maybe_unused]] char pad2[0x10];
#endif
CUtlString m_Name; // 64 | 80
CPlayerSlot m_nClientSlot; // 72 | 88
CEntityIndex m_nEntityIndex; // 76 | 92
[[maybe_unused]] char pad3[0x8];
INetChannel* m_NetChannel; // 88 | 104
[[maybe_unused]] char pad4[0x4];
int32 m_nSignonState; // 100 | 116
[[maybe_unused]] char pad5[0x38];
bool m_bFakePlayer; // 160 | 176
[[maybe_unused]] char pad6[0x7];
CPlayerUserId m_UserID; // 168 | 184
[[maybe_unused]] char pad7[0x1];
CSteamID m_SteamID; // 171 | 187
[[maybe_unused]] char pad8[0x19];
netadr_t m_NetAdr0; // 204 | 220
[[maybe_unused]] char pad9[0x14];
netadr_t m_NetAdr1; // 236 | 252
[[maybe_unused]] char pad10[0x22];
bool m_bIsHLTV; // 282 | 298
[[maybe_unused]] char pad11[0x19];
int32 m_nForceWaitForTick; // 308 | 324
[[maybe_unused]] char pad12[0x882];
bool m_bFullyAuthenticated; // 2490 | 2506
};
#pragma pack(pop)
// class CServerSideClient: public CServerSideClientBase, CUtlSlot, INetworkChannelNotify, INetworkMessageProcessingPreFilter
class CServerSideClient : public CServerSideClientBase
{
public:
virtual ~CServerSideClient() = 0;
};
#endif // SERVERSIDECLIENT_H