From d4b576bd49845a594ac2336ef6808a61dd8f6382 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 19 Jan 2023 15:06:08 +0100 Subject: [PATCH] Light structures cleanup --- r5dev/game/server/baseanimatingoverlay.h | 3 --- r5dev/public/edict.h | 3 ++- r5dev/public/globalvars_base.h | 2 +- r5dev/public/iservernetworkable.h | 3 ++- r5dev/public/playerstate.h | 6 +++++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/r5dev/game/server/baseanimatingoverlay.h b/r5dev/game/server/baseanimatingoverlay.h index 38407762..bafcd040 100644 --- a/r5dev/game/server/baseanimatingoverlay.h +++ b/r5dev/game/server/baseanimatingoverlay.h @@ -5,9 +5,6 @@ // $NoKeywords: $ // //=============================================================================// - -// #include "BaseAnimating.h" - #ifndef BASE_ANIMATING_OVERLAY_H #define BASE_ANIMATING_OVERLAY_H #ifdef _WIN32 diff --git a/r5dev/public/edict.h b/r5dev/public/edict.h index 118acf91..ab3e7b2f 100644 --- a/r5dev/public/edict.h +++ b/r5dev/public/edict.h @@ -8,6 +8,7 @@ #endif // !CLIENT_DLL typedef uint16_t edict_t; +#define FL_EDICT_INVALID -1 //----------------------------------------------------------------------------- // Purpose: Defines the ways that a map can be loaded. @@ -33,7 +34,7 @@ public: MapLoadType_t m_eLoadType; // How the current map was loaded. bool m_bMapLoadFailed; // Map has failed to load, we need to kick back to the main menu (unused?). - void* m_pUnk0; // r5apex_ds.exe 'CBaseServer::Clear() + 0x7E' + SHORT* m_pUnk0; // r5apex_ds.exe 'CBaseServer::Clear() + 0x7E' void* m_pUnk1; // r5apex_ds.exe 'CBaseServer::Clear() + 0x93' void* m_pUnk2; // r5apex_ds.exe 'CServer::FrameJob() + 0x20' void* m_pUnk3; diff --git a/r5dev/public/globalvars_base.h b/r5dev/public/globalvars_base.h index c3c47695..6cf986e0 100644 --- a/r5dev/public/globalvars_base.h +++ b/r5dev/public/globalvars_base.h @@ -29,7 +29,7 @@ public: int m_nMaxClients; // Current maxplayers setting GameMode_t m_nGameMode; // 1 (MP) 2 (PVE) 3 (SP) int m_nTickCount; // Simulation ticks - does not increase when game is paused - resets on restart. - int m_nUnk0; + int m_nTickInterval; int m_nUnk1; // The following seem to be mainly used in c:\depot\r5launch\src\engine\client\clientstate.cpp. diff --git a/r5dev/public/iservernetworkable.h b/r5dev/public/iservernetworkable.h index c5b02858..ecb8260f 100644 --- a/r5dev/public/iservernetworkable.h +++ b/r5dev/public/iservernetworkable.h @@ -12,6 +12,7 @@ // Forward declarations //----------------------------------------------------------------------------- class CBaseEntity; +class ServerClass; //----------------------------------------------------------------------------- // @@ -26,7 +27,7 @@ public: protected: // Should never call delete on this! virtual ~IServerNetworkable() {} - virtual void* Unk() {}; + virtual ServerClass* GetServerClass() {}; }; diff --git a/r5dev/public/playerstate.h b/r5dev/public/playerstate.h index b7ea80da..6d5a24ef 100644 --- a/r5dev/public/playerstate.h +++ b/r5dev/public/playerstate.h @@ -14,7 +14,11 @@ class CPlayerState { - char gap_0[8]; +public: + // This virtual method is necessary to generate a vtable in all cases + // (DECLARE_PREDICTABLE will generate a vtable also)! + virtual ~CPlayerState() {} + int playerEntityIndex; char gap_c[4]; __int64 currentClass;