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

Merge pull request #13 from WPMGPRoSToTeMa/master

Fixed DeathNotice hook crash (#12)
This commit is contained in:
theAsmodai 2016-06-17 02:57:57 +03:00 committed by GitHub
commit 3fa88db6e0

View File

@ -511,7 +511,7 @@ void CSGameRules_DeathNotice(IReGameHook_CSGameRules_DeathNotice *chain, CBasePl
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)