mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-28 15:45:31 +03:00
Fix crash on RG_CSGameRules_PlayerKilled: inflictor can be null
This commit is contained in:
parent
d1c3cd2755
commit
5ffedc69cb
@ -532,7 +532,7 @@ void CSGameRules_PlayerKilled(IReGameHook_CSGameRules_PlayerKilled *chain, CBase
|
||||
chain->callNext(getPrivate<CBasePlayer>(_pVictim), PEV(_pKiller), PEV(_pInflictor));
|
||||
};
|
||||
|
||||
callVoidForward(RG_CSGameRules_PlayerKilled, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), indexOfEdict(pInflictor));
|
||||
callVoidForward(RG_CSGameRules_PlayerKilled, original, indexOfEdict(pVictim->pev), indexOfEdict(pKiller), pInflictor ? indexOfEdict(pInflictor) : -1);
|
||||
}
|
||||
|
||||
void CSGameRules_DeathNotice(IReGameHook_CSGameRules_DeathNotice *chain, CBasePlayer *pVictim, entvars_t *pKiller, entvars_t *pevInflictor)
|
||||
|
Loading…
Reference in New Issue
Block a user