mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-16 00:28:17 +03:00
Fix GiveC4 hook callback return type (#295)
* Fix GiveC4 hook callback return type
This commit is contained in:
parent
5c38e6f5e4
commit
bf8b9bd48a
@ -1165,6 +1165,7 @@ enum GamedllFunc_CSGameRules
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Description: -
|
* Description: -
|
||||||
|
* Return type: CBasePlayer * (Entity index of player)
|
||||||
* Params: ()
|
* Params: ()
|
||||||
*/
|
*/
|
||||||
RG_CSGameRules_GiveC4,
|
RG_CSGameRules_GiveC4,
|
||||||
|
@ -339,8 +339,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;
|
||||||
|
@ -972,14 +972,14 @@ void CSGameRules_RemoveGuns(IReGameHook_CSGameRules_RemoveGuns *chain)
|
|||||||
callVoidForward(RG_CSGameRules_RemoveGuns, original);
|
callVoidForward(RG_CSGameRules_RemoveGuns, original);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSGameRules_GiveC4(IReGameHook_CSGameRules_GiveC4 *chain)
|
CBasePlayer *CSGameRules_GiveC4(IReGameHook_CSGameRules_GiveC4 *chain)
|
||||||
{
|
{
|
||||||
auto original = [chain]()
|
auto original = [chain]()
|
||||||
{
|
{
|
||||||
chain->callNext();
|
return indexOfPDataAmx(chain->callNext());
|
||||||
};
|
};
|
||||||
|
|
||||||
callVoidForward(RG_CSGameRules_GiveC4, original);
|
return getPrivate<CBasePlayer>(callForward<size_t>(RG_CSGameRules_GiveC4, original));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSGameRules_ChangeLevel(IReGameHook_CSGameRules_ChangeLevel *chain)
|
void CSGameRules_ChangeLevel(IReGameHook_CSGameRules_ChangeLevel *chain)
|
||||||
|
@ -476,7 +476,7 @@ void CSGameRules_CleanUpMap(IReGameHook_CSGameRules_CleanUpMap *chain);
|
|||||||
void CSGameRules_RestartRound(IReGameHook_CSGameRules_RestartRound *chain);
|
void CSGameRules_RestartRound(IReGameHook_CSGameRules_RestartRound *chain);
|
||||||
void CSGameRules_CheckWinConditions(IReGameHook_CSGameRules_CheckWinConditions *chain);
|
void CSGameRules_CheckWinConditions(IReGameHook_CSGameRules_CheckWinConditions *chain);
|
||||||
void CSGameRules_RemoveGuns(IReGameHook_CSGameRules_RemoveGuns *chain);
|
void CSGameRules_RemoveGuns(IReGameHook_CSGameRules_RemoveGuns *chain);
|
||||||
void CSGameRules_GiveC4(IReGameHook_CSGameRules_GiveC4 *chain);
|
CBasePlayer *CSGameRules_GiveC4(IReGameHook_CSGameRules_GiveC4 *chain);
|
||||||
void CSGameRules_ChangeLevel(IReGameHook_CSGameRules_ChangeLevel *chain);
|
void CSGameRules_ChangeLevel(IReGameHook_CSGameRules_ChangeLevel *chain);
|
||||||
void CSGameRules_GoToIntermission(IReGameHook_CSGameRules_GoToIntermission *chain);
|
void CSGameRules_GoToIntermission(IReGameHook_CSGameRules_GoToIntermission *chain);
|
||||||
void CSGameRules_BalanceTeams(IReGameHook_CSGameRules_BalanceTeams *chain);
|
void CSGameRules_BalanceTeams(IReGameHook_CSGameRules_BalanceTeams *chain);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user