mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-24 07:23:37 +03:00
Updated the GiveC4 to return a player pointer (#876)
This commit is contained in:
parent
96ba309e4a
commit
a9ec63df1b
@ -458,8 +458,8 @@ typedef IHookChainClassImpl<void, class CHalfLifeMultiplay> CReGameHook_CSGameRu
|
|||||||
typedef IHookChainRegistryClassEmptyImpl<void, class CHalfLifeMultiplay> CReGameHookRegistry_CSGameRules_RemoveGuns;
|
typedef IHookChainRegistryClassEmptyImpl<void, class CHalfLifeMultiplay> CReGameHookRegistry_CSGameRules_RemoveGuns;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::GiveC4 hook
|
// CHalfLifeMultiplay::GiveC4 hook
|
||||||
typedef IHookChainClassImpl<void, class CHalfLifeMultiplay> CReGameHook_CSGameRules_GiveC4;
|
typedef IHookChainClassImpl<CBasePlayer *, class CHalfLifeMultiplay> CReGameHook_CSGameRules_GiveC4;
|
||||||
typedef IHookChainRegistryClassEmptyImpl<void, class CHalfLifeMultiplay> CReGameHookRegistry_CSGameRules_GiveC4;
|
typedef IHookChainRegistryClassEmptyImpl<CBasePlayer *, class CHalfLifeMultiplay> CReGameHookRegistry_CSGameRules_GiveC4;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::ChangeLevel hook
|
// CHalfLifeMultiplay::ChangeLevel hook
|
||||||
typedef IHookChainClassImpl<void, class CHalfLifeMultiplay> CReGameHook_CSGameRules_ChangeLevel;
|
typedef IHookChainClassImpl<void, class CHalfLifeMultiplay> CReGameHook_CSGameRules_ChangeLevel;
|
||||||
|
@ -578,7 +578,7 @@ public:
|
|||||||
// check if the scenario has been won/lost
|
// check if the scenario has been won/lost
|
||||||
virtual void CheckWinConditions();
|
virtual void CheckWinConditions();
|
||||||
virtual void RemoveGuns();
|
virtual void RemoveGuns();
|
||||||
virtual void GiveC4();
|
virtual CBasePlayer *GiveC4();
|
||||||
virtual void ChangeLevel();
|
virtual void ChangeLevel();
|
||||||
virtual void GoToIntermission();
|
virtual void GoToIntermission();
|
||||||
|
|
||||||
@ -601,7 +601,7 @@ public:
|
|||||||
void RestartRound_OrigFunc();
|
void RestartRound_OrigFunc();
|
||||||
void CheckWinConditions_OrigFunc();
|
void CheckWinConditions_OrigFunc();
|
||||||
void RemoveGuns_OrigFunc();
|
void RemoveGuns_OrigFunc();
|
||||||
void GiveC4_OrigFunc();
|
CBasePlayer *GiveC4_OrigFunc();
|
||||||
void ChangeLevel_OrigFunc();
|
void ChangeLevel_OrigFunc();
|
||||||
void GoToIntermission_OrigFunc();
|
void GoToIntermission_OrigFunc();
|
||||||
void BalanceTeams_OrigFunc();
|
void BalanceTeams_OrigFunc();
|
||||||
|
@ -681,9 +681,9 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(CleanUpMap)()
|
|||||||
PLAYBACK_EVENT((FEV_GLOBAL | FEV_RELIABLE), 0, m_usResetDecals);
|
PLAYBACK_EVENT((FEV_GLOBAL | FEV_RELIABLE), 0, m_usResetDecals);
|
||||||
}
|
}
|
||||||
|
|
||||||
LINK_HOOK_CLASS_VOID_CUSTOM_CHAIN2(CHalfLifeMultiplay, CSGameRules, GiveC4)
|
LINK_HOOK_CLASS_CUSTOM_CHAIN2(CBasePlayer *, CHalfLifeMultiplay, CSGameRules, GiveC4)
|
||||||
|
|
||||||
void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(GiveC4)()
|
CBasePlayer *EXT_FUNC CHalfLifeMultiplay::__API_HOOK(GiveC4)()
|
||||||
{
|
{
|
||||||
int iTeamCount;
|
int iTeamCount;
|
||||||
int iTemp = 0;
|
int iTemp = 0;
|
||||||
@ -744,7 +744,7 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(GiveC4)()
|
|||||||
{
|
{
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
// we already have bomber
|
// we already have bomber
|
||||||
return;
|
return pPlayer;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -772,10 +772,12 @@ void EXT_FUNC CHalfLifeMultiplay::__API_HOOK(GiveC4)()
|
|||||||
if (pPlayer->pev->deadflag != DEAD_NO || pPlayer->m_iTeam != TERRORIST)
|
if (pPlayer->pev->deadflag != DEAD_NO || pPlayer->m_iTeam != TERRORIST)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pPlayer->MakeBomber();
|
if (pPlayer->MakeBomber())
|
||||||
return;
|
return pPlayer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHalfLifeMultiplay::QueueCareerRoundEndMenu(float tmDelay, int iWinStatus)
|
void CHalfLifeMultiplay::QueueCareerRoundEndMenu(float tmDelay, int iWinStatus)
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <API/CSInterfaces.h>
|
#include <API/CSInterfaces.h>
|
||||||
|
|
||||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||||
#define REGAMEDLL_API_VERSION_MINOR 24
|
#define REGAMEDLL_API_VERSION_MINOR 25
|
||||||
|
|
||||||
// CBasePlayer::Spawn hook
|
// CBasePlayer::Spawn hook
|
||||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||||
@ -337,8 +337,8 @@ typedef IHookChain<void> IReGameHook_CSGameRules_RemoveGuns;
|
|||||||
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_RemoveGuns;
|
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_RemoveGuns;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::GiveC4 hook
|
// CHalfLifeMultiplay::GiveC4 hook
|
||||||
typedef IHookChain<void> IReGameHook_CSGameRules_GiveC4;
|
typedef IHookChain<CBasePlayer *> IReGameHook_CSGameRules_GiveC4;
|
||||||
typedef IHookChainRegistry<void> IReGameHookRegistry_CSGameRules_GiveC4;
|
typedef IHookChainRegistry<CBasePlayer *> IReGameHookRegistry_CSGameRules_GiveC4;
|
||||||
|
|
||||||
// CHalfLifeMultiplay::ChangeLevel hook
|
// CHalfLifeMultiplay::ChangeLevel hook
|
||||||
typedef IHookChain<void> IReGameHook_CSGameRules_ChangeLevel;
|
typedef IHookChain<void> IReGameHook_CSGameRules_ChangeLevel;
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_MAJOR 5
|
#define VERSION_MAJOR 5
|
||||||
#define VERSION_MINOR 23
|
#define VERSION_MINOR 25
|
||||||
#define VERSION_MAINTENANCE 0
|
#define VERSION_MAINTENANCE 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user