From fe0ea9a1bc1de517f89a1780eedc7a151f764293 Mon Sep 17 00:00:00 2001 From: Asmodai Date: Mon, 9 Apr 2018 03:28:14 +0300 Subject: [PATCH] Crash fix --- regamedll/dlls/API/CAPI_Impl.cpp | 2 +- regamedll/dlls/API/CAPI_Impl.h | 12 ++++++------ regamedll/public/regamedll/regamedll_api.h | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/regamedll/dlls/API/CAPI_Impl.cpp b/regamedll/dlls/API/CAPI_Impl.cpp index c4ee42a1..7d67e0f9 100644 --- a/regamedll/dlls/API/CAPI_Impl.cpp +++ b/regamedll/dlls/API/CAPI_Impl.cpp @@ -116,7 +116,6 @@ GAMEHOOK_REGISTRY(ShowVGUIMenu); GAMEHOOK_REGISTRY(BuyGunAmmo); GAMEHOOK_REGISTRY(BuyWeaponByWeaponID); GAMEHOOK_REGISTRY(InternalCommand); -GAMEHOOK_REGISTRY(IsPenetrableEntity); GAMEHOOK_REGISTRY(CSGameRules_FShouldSwitchWeapon); GAMEHOOK_REGISTRY(CSGameRules_GetNextBestWeapon); @@ -160,6 +159,7 @@ GAMEHOOK_REGISTRY(ThrowSmokeGrenade); GAMEHOOK_REGISTRY(PlantBomb); GAMEHOOK_REGISTRY(CBasePlayer_SetSpawnProtection); GAMEHOOK_REGISTRY(CBasePlayer_RemoveSpawnProtection); +GAMEHOOK_REGISTRY(IsPenetrableEntity); int CReGameApi::GetMajorVersion() { return REGAMEDLL_API_VERSION_MAJOR; diff --git a/regamedll/dlls/API/CAPI_Impl.h b/regamedll/dlls/API/CAPI_Impl.h index eef4519a..3afe1181 100644 --- a/regamedll/dlls/API/CAPI_Impl.h +++ b/regamedll/dlls/API/CAPI_Impl.h @@ -361,10 +361,6 @@ typedef IHookChainRegistryImpl CReGa typedef IHookChainImpl CReGameHook_InternalCommand; typedef IHookChainRegistryImpl CReGameHookRegistry_InternalCommand; -// IsPenetrableEntity hook -typedef IHookChainImpl CReGameHook_IsPenetrableEntity; -typedef IHookChainRegistryImpl CReGameHookRegistry_IsPenetrableEntity; - // CHalfLifeMultiplay::FShouldSwitchWeapon hook typedef IHookChainClassImpl CReGameHook_CSGameRules_FShouldSwitchWeapon; typedef IHookChainRegistryClassEmptyImpl CReGameHookRegistry_CSGameRules_FShouldSwitchWeapon; @@ -533,6 +529,10 @@ typedef IHookChainRegistryClassImpl CReGameHookRegistr typedef IHookChainImpl CReGameHook_CBasePlayer_RemoveSpawnProtection; typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_RemoveSpawnProtection; +// IsPenetrableEntity hook +typedef IHookChainImpl CReGameHook_IsPenetrableEntity; +typedef IHookChainRegistryImpl CReGameHookRegistry_IsPenetrableEntity; + class CReGameHookchains: public IReGameHookchains { public: // CBasePlayer virtual @@ -595,7 +595,6 @@ public: CReGameHookRegistry_BuyGunAmmo m_BuyGunAmmo; CReGameHookRegistry_BuyWeaponByWeaponID m_BuyWeaponByWeaponID; CReGameHookRegistry_InternalCommand m_InternalCommand; - CReGameHookRegistry_IsPenetrableEntity m_IsPenetrableEntity; CReGameHookRegistry_CSGameRules_FShouldSwitchWeapon m_CSGameRules_FShouldSwitchWeapon; CReGameHookRegistry_CSGameRules_GetNextBestWeapon m_CSGameRules_GetNextBestWeapon; @@ -640,6 +639,7 @@ public: CReGameHookRegistry_PlantBomb m_PlantBomb; CReGameHookRegistry_CBasePlayer_SetSpawnProtection m_CBasePlayer_SetSpawnProtection; CReGameHookRegistry_CBasePlayer_RemoveSpawnProtection m_CBasePlayer_RemoveSpawnProtection; + CReGameHookRegistry_IsPenetrableEntity m_IsPenetrableEntity; public: virtual IReGameHookRegistry_CBasePlayer_Spawn *CBasePlayer_Spawn(); virtual IReGameHookRegistry_CBasePlayer_Precache *CBasePlayer_Precache(); @@ -700,7 +700,6 @@ public: virtual IReGameHookRegistry_BuyGunAmmo *BuyGunAmmo(); virtual IReGameHookRegistry_BuyWeaponByWeaponID *BuyWeaponByWeaponID(); virtual IReGameHookRegistry_InternalCommand *InternalCommand(); - virtual IReGameHookRegistry_IsPenetrableEntity *IsPenetrableEntity(); virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon *CSGameRules_FShouldSwitchWeapon(); virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon *CSGameRules_GetNextBestWeapon(); @@ -745,6 +744,7 @@ public: virtual IReGameHookRegistry_PlantBomb *PlantBomb(); virtual IReGameHookRegistry_CBasePlayer_SetSpawnProtection *CBasePlayer_SetSpawnProtection(); virtual IReGameHookRegistry_CBasePlayer_RemoveSpawnProtection *CBasePlayer_RemoveSpawnProtection(); + virtual IReGameHookRegistry_IsPenetrableEntity *IsPenetrableEntity(); }; extern CReGameHookchains g_ReGameHookchains; diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 2754ebc1..224fa1e8 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -264,10 +264,6 @@ typedef IHookChainRegistry IReGameHook_InternalCommand; typedef IHookChainRegistry IReGameHookRegistry_InternalCommand; -// IsPenetrableEntity hook -typedef IHookChain IReGameHook_IsPenetrableEntity; -typedef IHookChainRegistry IReGameHookRegistry_IsPenetrableEntity; - // CHalfLifeMultiplay::FShouldSwitchWeapon hook typedef IHookChain IReGameHook_CSGameRules_FShouldSwitchWeapon; typedef IHookChainRegistry IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon; @@ -436,6 +432,10 @@ typedef IHookChainRegistryClass IReGameHookRegis typedef IHookChainClass IReGameHook_CBasePlayer_RemoveSpawnProtection; typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_RemoveSpawnProtection; +// IsPenetrableEntity hook +typedef IHookChain IReGameHook_IsPenetrableEntity; +typedef IHookChainRegistry IReGameHookRegistry_IsPenetrableEntity; + class IReGameHookchains { public: virtual ~IReGameHookchains() {} @@ -500,7 +500,6 @@ public: virtual IReGameHookRegistry_BuyGunAmmo *BuyGunAmmo() = 0; virtual IReGameHookRegistry_BuyWeaponByWeaponID *BuyWeaponByWeaponID() = 0; virtual IReGameHookRegistry_InternalCommand *InternalCommand() = 0; - virtual IReGameHookRegistry_IsPenetrableEntity *IsPenetrableEntity() = 0; virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon *CSGameRules_FShouldSwitchWeapon() = 0; virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon *CSGameRules_GetNextBestWeapon() = 0; @@ -544,6 +543,7 @@ public: virtual IReGameHookRegistry_PlantBomb *PlantBomb() = 0; virtual IReGameHookRegistry_CBasePlayer_RemoveSpawnProtection *CBasePlayer_RemoveSpawnProtection() = 0; virtual IReGameHookRegistry_CBasePlayer_SetSpawnProtection *CBasePlayer_SetSpawnProtection() = 0; + virtual IReGameHookRegistry_IsPenetrableEntity *IsPenetrableEntity() = 0; }; struct ReGameFuncs_t {