mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
ReGameDLL API: Add PM_UpdateStepSound (#93)
Fixes #90 Fix: not ending of the round when the hostages rescued
This commit is contained in:
parent
e0ee615183
commit
70594c4c39
@ -516,6 +516,10 @@ void CHostage::Remove()
|
||||
pev->solid = SOLID_NOT;
|
||||
pev->takedamage = DAMAGE_NO;
|
||||
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
pev->deadflag = DEAD_DEAD;
|
||||
#endif
|
||||
|
||||
UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0));
|
||||
pev->nextthink = -1;
|
||||
m_flNextFullThink = -1;
|
||||
|
@ -1681,7 +1681,10 @@ void EXT_FUNC CHalfLifeMultiplay::__API_VHOOK(RestartRound)()
|
||||
g_pHostages->RestartRound();
|
||||
}
|
||||
|
||||
#ifndef REGAMEDLL_FIXES
|
||||
++m_iTotalRoundsPlayed;
|
||||
#endif
|
||||
|
||||
ClearBodyQue();
|
||||
|
||||
// Hardlock the player accelaration to 5.0
|
||||
@ -1810,6 +1813,12 @@ void EXT_FUNC CHalfLifeMultiplay::__API_VHOOK(RestartRound)()
|
||||
TheBots->OnEvent(EVENT_NEW_MATCH);
|
||||
}
|
||||
}
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
else
|
||||
{
|
||||
m_iTotalRoundsPlayed++;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_bFreezePeriod = TRUE;
|
||||
m_bRoundTerminating = false;
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "items.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||
#define REGAMEDLL_API_VERSION_MINOR 0
|
||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
||||
|
||||
// CBasePlayer::Spawn hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||
@ -354,6 +354,10 @@ typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_OnRoundFreezeEnd;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
||||
|
||||
// PM_UpdateStepSound hook
|
||||
typedef IVoidHookChain<> IReGameHook_PM_UpdateStepSound;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_PM_UpdateStepSound;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -442,6 +446,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_GoToIntermission* CSGameRules_GoToIntermission() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0;
|
||||
virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -373,7 +373,9 @@ void PM_CatagorizeTextureType()
|
||||
pmove->chtexturetype = PM_FindTextureType(pmove->sztexturename);
|
||||
}
|
||||
|
||||
void PM_UpdateStepSound()
|
||||
LINK_HOOK_VOID_CHAIN2(PM_UpdateStepSound);
|
||||
|
||||
void EXT_FUNC __API_HOOK(PM_UpdateStepSound)()
|
||||
{
|
||||
float fvol;
|
||||
vec3_t knee;
|
||||
|
@ -85,6 +85,7 @@ void PM_Init_(struct playermove_s *ppmove);
|
||||
void PM_Move_(struct playermove_s *ppmove, int server);
|
||||
void PM_AirMove_(int playerIndex);
|
||||
void PM_AirMove_internal();
|
||||
void PM_UpdateStepSound_();
|
||||
|
||||
extern struct playermove_s *pmove;
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "items.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||
#define REGAMEDLL_API_VERSION_MINOR 0
|
||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
||||
|
||||
// CBasePlayer::Spawn hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||
@ -354,6 +354,10 @@ typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||
typedef IVoidHookChain<> IReGameHook_CSGameRules_OnRoundFreezeEnd;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
||||
|
||||
// PM_UpdateStepSound hook
|
||||
typedef IVoidHookChain<> IReGameHook_PM_UpdateStepSound;
|
||||
typedef IVoidHookChainRegistry<> IReGameHookRegistry_PM_UpdateStepSound;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -442,6 +446,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_GoToIntermission* CSGameRules_GoToIntermission() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd() = 0;
|
||||
virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -139,6 +139,7 @@ GAMEHOOK_REGISTRY(CSGameRules_ChangeLevel);
|
||||
GAMEHOOK_REGISTRY(CSGameRules_GoToIntermission);
|
||||
GAMEHOOK_REGISTRY(CSGameRules_BalanceTeams);
|
||||
GAMEHOOK_REGISTRY(CSGameRules_OnRoundFreezeEnd);
|
||||
GAMEHOOK_REGISTRY(PM_UpdateStepSound);
|
||||
|
||||
int EXT_FUNC CReGameApi::GetMajorVersion() {
|
||||
return REGAMEDLL_API_VERSION_MAJOR;
|
||||
|
@ -350,6 +350,10 @@ typedef IVoidHookChainRegistryClassEmptyImpl<class CHalfLifeMultiplay> CReGameHo
|
||||
typedef IVoidHookChainClassImpl<class CHalfLifeMultiplay> CReGameHook_CSGameRules_OnRoundFreezeEnd;
|
||||
typedef IVoidHookChainRegistryClassEmptyImpl<class CHalfLifeMultiplay> CReGameHookRegistry_CSGameRules_OnRoundFreezeEnd;
|
||||
|
||||
// PM_UpdateStepSound hook
|
||||
typedef IVoidHookChainImpl<> CReGameHook_PM_UpdateStepSound;
|
||||
typedef IVoidHookChainRegistryImpl<> CReGameHookRegistry_PM_UpdateStepSound;
|
||||
|
||||
class CReGameHookchains: public IReGameHookchains {
|
||||
public:
|
||||
// CBasePlayer virtual
|
||||
@ -436,6 +440,7 @@ public:
|
||||
CReGameHookRegistry_CSGameRules_GoToIntermission m_CSGameRules_GoToIntermission;
|
||||
CReGameHookRegistry_CSGameRules_BalanceTeams m_CSGameRules_BalanceTeams;
|
||||
CReGameHookRegistry_CSGameRules_OnRoundFreezeEnd m_CSGameRules_OnRoundFreezeEnd;
|
||||
CReGameHookRegistry_PM_UpdateStepSound m_PM_UpdateStepSound;
|
||||
|
||||
public:
|
||||
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn();
|
||||
@ -521,6 +526,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_GoToIntermission* CSGameRules_GoToIntermission();
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams();
|
||||
virtual IReGameHookRegistry_CSGameRules_OnRoundFreezeEnd* CSGameRules_OnRoundFreezeEnd();
|
||||
virtual IReGameHookRegistry_PM_UpdateStepSound* PM_UpdateStepSound();
|
||||
};
|
||||
|
||||
extern CReGameHookchains g_ReGameHookchains;
|
||||
|
Loading…
Reference in New Issue
Block a user