2
0
mirror of https://github.com/rehlds/reapi.git synced 2024-12-29 08:05:36 +03:00

Fixed DeathNotice hook crash (#12)

This commit is contained in:
WPMGPRoSToTeMa 2016-06-17 01:39:30 +03:00
parent 084fc056a7
commit db59cd3c4d

View File

@ -511,7 +511,7 @@ void CSGameRules_DeathNotice(IReGameHook_CSGameRules_DeathNotice *chain, CBasePl
chain->callNext(getPrivate<CBasePlayer>(_pVictim), PEV(_pKiller), PEV(_pevInflictor)); chain->callNext(getPrivate<CBasePlayer>(_pVictim), PEV(_pKiller), PEV(_pevInflictor));
}; };
callVoidForward(RG_CSGameRules_DeathNotice, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), indexOfEdict(pevInflictor)); callVoidForward(RG_CSGameRules_DeathNotice, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), pevInflictor ? indexOfEdict(pevInflictor) : -1);
} }
int CSGameRules_CanHavePlayerItem(IReGameHook_CSGameRules_CanHavePlayerItem *chain, CBasePlayer *pPlayer, CBasePlayerItem *pItem) int CSGameRules_CanHavePlayerItem(IReGameHook_CSGameRules_CanHavePlayerItem *chain, CBasePlayer *pPlayer, CBasePlayerItem *pItem)