diff --git a/gradle.properties b/gradle.properties index 9d05fdf8..8e5a9c26 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ majorVersion=5 -minorVersion=2 +minorVersion=3 maintenanceVersion=0 diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 6cb866d5..801940ed 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -3735,9 +3735,12 @@ void EXT_FUNC CBasePlayer::__API_VHOOK(RoundRespawn)() } + +LINK_HOOK_CLASS_VOID_CHAIN2(CBasePlayer, StartDeathCam) + // StartDeathCam - find an intermission spot and send the // player off into observer mode -void CBasePlayer::StartDeathCam() +void EXT_FUNC CBasePlayer::__API_HOOK(StartDeathCam)() { #ifdef REGAMEDLL_FXIES m_canSwitchObserverModes = true; diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index 9e6bcd9a..6032c665 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -505,6 +505,7 @@ public: void SetWeaponAnimType(const char *szExtention) { Q_strcpy(m_szAnimExtention, szExtention); } void CheatImpulseCommands(int iImpulse); void StartDeathCam(); + void StartDeathCam_(); void StartObserver(Vector &vecPosition, Vector &vecViewAngle); void StartObserver_(Vector &vecPosition, Vector &vecViewAngle); void HandleSignals(); diff --git a/regamedll/extra/cssdk/dlls/regamedll_api.h b/regamedll/extra/cssdk/dlls/regamedll_api.h index c60cac47..9ae67a77 100644 --- a/regamedll/extra/cssdk/dlls/regamedll_api.h +++ b/regamedll/extra/cssdk/dlls/regamedll_api.h @@ -36,7 +36,7 @@ #include "items.h" #define REGAMEDLL_API_VERSION_MAJOR 5 -#define REGAMEDLL_API_VERSION_MINOR 1 +#define REGAMEDLL_API_VERSION_MINOR 3 // CBasePlayer::Spawn hook typedef IVoidHookChainClass IReGameHook_CBasePlayer_Spawn; @@ -358,6 +358,10 @@ typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_OnRoundFreezeEn typedef IVoidHookChain<> IReGameHook_PM_UpdateStepSound; typedef IVoidHookChainRegistry<> IReGameHookRegistry_PM_UpdateStepSound; +// CBasePlayer::StartDeathCam hook +typedef IVoidHookChainClass IReGameHook_CBasePlayer_StartDeathCam; +typedef IVoidHookChainRegistryClass IReGameHookRegistry_CBasePlayer_StartDeathCam; + class IReGameHookchains { public: virtual ~IReGameHookchains() {} @@ -447,6 +451,7 @@ public: virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0; virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0; virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0; + virtual IReGameHookRegistry_CBasePlayer_StartDeathCam* CBasePlayer_StartDeathCam() = 0; }; struct ReGameFuncs_t { diff --git a/regamedll/extra/cssdk/dlls/regamedll_interfaces.h b/regamedll/extra/cssdk/dlls/regamedll_interfaces.h index 38486f63..783cae96 100644 --- a/regamedll/extra/cssdk/dlls/regamedll_interfaces.h +++ b/regamedll/extra/cssdk/dlls/regamedll_interfaces.h @@ -95,6 +95,7 @@ public: virtual void Disappear(); virtual void MakeVIP(); virtual bool MakeBomber(); + virtual void StartDeathCam(); CBasePlayer *BasePlayer() const; public: diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 3f03c634..9c3ee1d0 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -36,7 +36,7 @@ #include "items.h" #define REGAMEDLL_API_VERSION_MAJOR 5 -#define REGAMEDLL_API_VERSION_MINOR 2 +#define REGAMEDLL_API_VERSION_MINOR 3 // CBasePlayer::Spawn hook typedef IHookChainClass IReGameHook_CBasePlayer_Spawn; @@ -358,6 +358,10 @@ typedef IHookChainRegistry IReGameHookRegistry_CSGameRules_OnRoundFreezeEn typedef IHookChain IReGameHook_PM_UpdateStepSound; typedef IHookChainRegistry IReGameHookRegistry_PM_UpdateStepSound; +// CBasePlayer::StartDeathCam hook +typedef IHookChainClass IReGameHook_CBasePlayer_StartDeathCam; +typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_StartDeathCam; + class IReGameHookchains { public: virtual ~IReGameHookchains() {} @@ -447,6 +451,7 @@ public: virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0; virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0; virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0; + virtual IReGameHookRegistry_CBasePlayer_StartDeathCam* CBasePlayer_StartDeathCam() = 0; }; struct ReGameFuncs_t { diff --git a/regamedll/public/regamedll/regamedll_interfaces.h b/regamedll/public/regamedll/regamedll_interfaces.h index 4bc6c74f..c84e9dd1 100644 --- a/regamedll/public/regamedll/regamedll_interfaces.h +++ b/regamedll/public/regamedll/regamedll_interfaces.h @@ -84,6 +84,7 @@ public: virtual bool SwitchWeapon(CBasePlayerItem *pWeapon); virtual void SwitchTeam(); virtual bool JoinTeam(TeamName team); + virtual void StartDeathCam(); virtual void StartObserver(Vector& vecPosition, Vector& vecViewAngle); virtual void TeamChangeUpdate(); virtual void DropSecondary(); diff --git a/regamedll/regamedll/regamedll_api_impl.cpp b/regamedll/regamedll/regamedll_api_impl.cpp index 6eb1c72e..2616a1f4 100644 --- a/regamedll/regamedll/regamedll_api_impl.cpp +++ b/regamedll/regamedll/regamedll_api_impl.cpp @@ -140,6 +140,7 @@ GAMEHOOK_REGISTRY(CSGameRules_GoToIntermission); GAMEHOOK_REGISTRY(CSGameRules_BalanceTeams); GAMEHOOK_REGISTRY(CSGameRules_OnRoundFreezeEnd); GAMEHOOK_REGISTRY(PM_UpdateStepSound); +GAMEHOOK_REGISTRY(CBasePlayer_StartDeathCam); int EXT_FUNC CReGameApi::GetMajorVersion() { return REGAMEDLL_API_VERSION_MAJOR; diff --git a/regamedll/regamedll/regamedll_api_impl.h b/regamedll/regamedll/regamedll_api_impl.h index ec07b59c..128defe9 100644 --- a/regamedll/regamedll/regamedll_api_impl.h +++ b/regamedll/regamedll/regamedll_api_impl.h @@ -354,6 +354,10 @@ typedef IHookChainRegistryClassEmptyImpl CReGame typedef IHookChainImpl CReGameHook_PM_UpdateStepSound; typedef IHookChainRegistryImpl CReGameHookRegistry_PM_UpdateStepSound; +// CBasePlayer::StartDeathCam hook +typedef IHookChainClassImpl CReGameHook_CBasePlayer_StartDeathCam; +typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_StartDeathCam; + class CReGameHookchains: public IReGameHookchains { public: // CBasePlayer virtual @@ -441,6 +445,7 @@ public: CReGameHookRegistry_CSGameRules_BalanceTeams m_CSGameRules_BalanceTeams; CReGameHookRegistry_CSGameRules_OnRoundFreezeEnd m_CSGameRules_OnRoundFreezeEnd; CReGameHookRegistry_PM_UpdateStepSound m_PM_UpdateStepSound; + CReGameHookRegistry_CBasePlayer_StartDeathCam m_CBasePlayer_StartDeathCam; public: virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn(); @@ -527,6 +532,7 @@ public: virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams(); virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd(); virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound(); + virtual IReGameHookRegistry_CBasePlayer_StartDeathCam* CBasePlayer_StartDeathCam(); }; extern CReGameHookchains g_ReGameHookchains; diff --git a/regamedll/regamedll/regamedll_interfaces_impl.cpp b/regamedll/regamedll/regamedll_interfaces_impl.cpp index 02d169c4..02ecc45c 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.cpp +++ b/regamedll/regamedll/regamedll_interfaces_impl.cpp @@ -331,3 +331,4 @@ void EXT_FUNC CCSPlayer::Disappear() { BasePlayer()->Disappear(); } void EXT_FUNC CCSPlayer::MakeVIP() { BasePlayer()->MakeVIP(); } bool EXT_FUNC CCSPlayer::MakeBomber() { return BasePlayer()->MakeBomber(); } void EXT_FUNC CCSPlayer::ResetSequenceInfo() { BasePlayer()->ResetSequenceInfo(); } +void EXT_FUNC CCSPlayer::StartDeathCam() { BasePlayer()->StartDeathCam(); }