mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-22 02:41:56 +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
57d333b6b5
commit
ccc615e9b1
1 changed files with 4 additions and 1 deletions
|
@ -6283,8 +6283,11 @@ void P_RunShadows(void)
|
|||
next = mobj->hnext;
|
||||
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?
|
||||
}
|
||||
|
||||
if ((mobj->target->flags2 & MF2_DONTDRAW)
|
||||
|| (((mobj->target->eflags & MFE_VERTICALFLIP) && mobj->target->z+mobj->target->height > mobj->target->ceilingz)
|
||||
|
|
Loading…
Reference in a new issue