aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/r2server.h
blob: c032d722f3902f0f17df80c5f3bfb285499754af (plain)
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
#pragma once

// use the R2 namespace for game funcs
namespace R2
{
	enum server_state_t
	{
		ss_dead = 0, // Dead
		ss_loading, // Spawning
		ss_active, // Running
		ss_paused, // Running, but paused
	};

	extern server_state_t* g_pServerState;

	// server entity stuff
	extern void* (*Server_GetEntityByIndex)(int index);

	const int PERSISTENCE_MAX_SIZE = 0xD000;

	enum class ePersistenceReady : char
	{
		NOT_READY,
		READY = 3,
		READY_LOCAL = 3,
		READY_REMOTE
	};

	#pragma pack(push, 1)
	struct CBasePlayer
	{
		char pad0[0x16];

		// +0x16
		char m_Name[64];
		// +0x56

		char pad1[0x44A];

		// +0x4A0
		ePersistenceReady m_iPersistenceReady;
		// +0x4A1

		char pad2[0x59];

		// +0x4FA
		char m_PersistenceBuffer[PERSISTENCE_MAX_SIZE];

		char pad3[0x2006];

		// +0xF500
		char m_UID[32];
	};
	#pragma pack(pop)

	extern CBasePlayer*(__fastcall* UTIL_PlayerByIndex)(int playerIndex);
} // namespace R2