diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 92d82b55..ad165038 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -268,7 +268,10 @@ public: virtual int GetMinorVersion() = 0; virtual const ReGameFuncs_t* GetFuncs() = 0; virtual IReGameHookchains* GetHookchains() = 0; - virtual IReGameData* GetGameData() = 0; + + virtual class CGameRules* GetGameRules() = 0; + virtual struct WeaponInfoStruct *GetWeaponInfo(int weaponID) = 0; + virtual struct playermove_s *GetPlayerMove() = 0; }; diff --git a/regamedll/public/regamedll/regamedll_interfaces.h b/regamedll/public/regamedll/regamedll_interfaces.h index 9898151e..7b40929e 100644 --- a/regamedll/public/regamedll/regamedll_interfaces.h +++ b/regamedll/public/regamedll/regamedll_interfaces.h @@ -2071,12 +2071,3 @@ public: virtual void Spawn() = 0; virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; }; - -class IReGameData { -public: - virtual ~IReGameData() {} - - virtual class CGameRules* GetGameRules() = 0; - virtual struct WeaponInfoStruct *GetWeaponInfo(int weaponID) = 0; - virtual struct playermove_s *GetPlayerMove() = 0; -}; diff --git a/regamedll/regamedll/regamedll_api_impl.cpp b/regamedll/regamedll/regamedll_api_impl.cpp index be7335db..c9dd7f4c 100644 --- a/regamedll/regamedll/regamedll_api_impl.cpp +++ b/regamedll/regamedll/regamedll_api_impl.cpp @@ -28,7 +28,6 @@ #include "precompiled.h" CReGameHookchains g_ReGameHookchains; -CReGameData g_ReGameData; ReGameFuncs_t g_ReGameApiFuncs = { &UTIL_PlayerByIndex, @@ -113,9 +112,16 @@ IReGameHookchains *CReGameApi::GetHookchains() return &g_ReGameHookchains; } -IReGameData *CReGameApi::GetGameData() -{ - return &g_ReGameData; +CGameRules* EXT_FUNC CReGameApi::GetGameRules() { + return g_pGameRules; +} + +WeaponInfoStruct* EXT_FUNC CReGameApi::GetWeaponInfo(int weaponID) { + return ::GetWeaponInfo(weaponID); +} + +playermove_t* EXT_FUNC CReGameApi::GetPlayerMove() { + return pmove; } void EXT_FUNC Regamedll_ChangeString_api(char *&dest, const char *source) diff --git a/regamedll/regamedll/regamedll_api_impl.h b/regamedll/regamedll/regamedll_api_impl.h index f3862057..fb697860 100644 --- a/regamedll/regamedll/regamedll_api_impl.h +++ b/regamedll/regamedll/regamedll_api_impl.h @@ -279,7 +279,6 @@ public: }; extern CReGameHookchains g_ReGameHookchains; -extern CReGameData g_ReGameData; extern ReGameFuncs_t g_ReGameApiFuncs; class CReGameApi: public IReGameApi { @@ -289,7 +288,10 @@ public: virtual const ReGameFuncs_t *GetFuncs(); virtual IReGameHookchains *GetHookchains(); - virtual IReGameData* GetGameData(); + + virtual CGameRules* GetGameRules(); + virtual WeaponInfoStruct *GetWeaponInfo(int weaponID); + virtual playermove_t *GetPlayerMove(); }; void Regamedll_ChangeString_api(char *&dest, const char *source); diff --git a/regamedll/regamedll/regamedll_interfaces_impl.cpp b/regamedll/regamedll/regamedll_interfaces_impl.cpp index 583ef98a..e1a8708a 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.cpp +++ b/regamedll/regamedll/regamedll_interfaces_impl.cpp @@ -134,15 +134,3 @@ ICSEntity *EXT_FUNC INDEX_TO_CSENTITY(int iEntityIndex) CBaseEntity *pEntity = CBaseEntity::Instance(INDEXENT(iEntityIndex)); return CBASE_TO_CSENTITY(pEntity); } - -CGameRules* EXT_FUNC CReGameData::GetGameRules() { - return g_pGameRules; -} - -WeaponInfoStruct* EXT_FUNC CReGameData::GetWeaponInfo(int weaponID) { - return ::GetWeaponInfo(weaponID); -} - -playermove_t* EXT_FUNC CReGameData::GetPlayerMove() { - return pmove; -} diff --git a/regamedll/regamedll/regamedll_interfaces_impl.h b/regamedll/regamedll/regamedll_interfaces_impl.h index 1e08bd8a..c9a595a5 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.h +++ b/regamedll/regamedll/regamedll_interfaces_impl.h @@ -2520,13 +2520,6 @@ public: virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } }; -class CReGameData: public IReGameData { -public: - virtual CGameRules* GetGameRules(); - virtual WeaponInfoStruct *GetWeaponInfo(int weaponID); - virtual playermove_t *GetPlayerMove(); -}; - template inline T *Regamedll_InitializeEntities(CBaseEntity *a) {