mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Fix a potential crash vector in the shadows code. (It DEFINITELY crashed when I was testing the thunder shield, for example.)
This commit is contained in:
parent
45455ca35b
commit
e342315ca8
1 changed files with 4 additions and 1 deletions
|
|
@ -6283,8 +6283,11 @@ void P_RunShadows(void)
|
||||||
next = mobj->hnext;
|
next = mobj->hnext;
|
||||||
P_SetTarget(&mobj->hnext, NULL);
|
P_SetTarget(&mobj->hnext, NULL);
|
||||||
|
|
||||||
if (!mobj->target)
|
if (!mobj->target || P_MobjWasRemoved(mobj->target))
|
||||||
|
{
|
||||||
|
mobj->flags2 |= MF2_DONTDRAW;
|
||||||
continue; // shouldn't you already be dead?
|
continue; // shouldn't you already be dead?
|
||||||
|
}
|
||||||
|
|
||||||
if ((mobj->target->flags2 & MF2_DONTDRAW)
|
if ((mobj->target->flags2 & MF2_DONTDRAW)
|
||||||
|| (((mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z+mobj->target->height > mobj->target->ceilingz)
|
|| (((mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z+mobj->target->height > mobj->target->ceilingz)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue