mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-21 17:41:48 +00:00
Guard against more unsafe accesses to P_DamageMobj source
This commit is contained in:
parent
b6241adbe9
commit
78a727e9cb
1 changed files with 5 additions and 1 deletions
|
|
@ -2698,7 +2698,11 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
if (damagetype != DMG_SPECTATOR && target->player && target->player->spectator)
|
||||
return false;
|
||||
|
||||
if (!P_MobjWasRemoved(source) && source->player && source->player->spectator)
|
||||
// source is checked without a removal guard in so many places that it's genuinely less work to do it here.
|
||||
if (source && P_MobjWasRemoved(source))
|
||||
source = NULL;
|
||||
|
||||
if (source && source->player && source->player->spectator)
|
||||
return false;
|
||||
|
||||
if (((damagetype & DMG_TYPEMASK) == DMG_STING)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue