ReGameDLL API: Implement API for StartDeathCam (#162)

* ReGameDLL API: Implement API for StartDeathCam
* Fix API minor version, related to 90d08ee3a0
* Increment API minor version in gradle.properties
This commit is contained in:
In-line 2017-06-25 17:21:38 +04:00 committed by Dmitry Novikov
parent 1dc484980f
commit efea014cbc
10 changed files with 28 additions and 4 deletions

View File

@ -1,3 +1,3 @@
majorVersion=5
minorVersion=2
minorVersion=3
maintenanceVersion=0

View File

@ -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;

View File

@ -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();

View File

@ -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<class CBasePlayer> 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<class CBasePlayer> IReGameHook_CBasePlayer_StartDeathCam;
typedef IVoidHookChainRegistryClass<class CBasePlayer> 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 {

View File

@ -95,6 +95,7 @@ public:
virtual void Disappear();
virtual void MakeVIP();
virtual bool MakeBomber();
virtual void StartDeathCam();
CBasePlayer *BasePlayer() const;
public:

View File

@ -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<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
@ -358,6 +358,10 @@ typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_OnRoundFreezeEn
typedef IHookChain<void> IReGameHook_PM_UpdateStepSound;
typedef IHookChainRegistry<void> IReGameHookRegistry_PM_UpdateStepSound;
// CBasePlayer::StartDeathCam hook
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_StartDeathCam;
typedef IHookChainRegistryClass<void, class CBasePlayer> 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 {

View File

@ -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();

View File

@ -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;

View File

@ -354,6 +354,10 @@ typedef IHookChainRegistryClassEmptyImpl<void, class CHalfLifeMultiplay> CReGame
typedef IHookChainImpl<void> CReGameHook_PM_UpdateStepSound;
typedef IHookChainRegistryImpl<void> CReGameHookRegistry_PM_UpdateStepSound;
// CBasePlayer::StartDeathCam hook
typedef IHookChainClassImpl<void, CBasePlayer> CReGameHook_CBasePlayer_StartDeathCam;
typedef IHookChainRegistryClassImpl<void, CBasePlayer> 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;

View File

@ -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(); }