Fix shadows from sometimes crashing on mapload
this properly fixes the mapchange spam from crashing the game P_RunShadows, like any other thinker function, should also be called in preticker not just ticker potentioally also fixes other issues
This commit is contained in:
1 parent
284845aad6
commit
fcf0836e7b
2 files changed
+25
-12
No files matched your search
+23
-12
@@ -6063,13 +6063,22 @@ static void P_AddOverlay(mobj_t *thing)
|
||||
static void P_RemoveOverlay(mobj_t *thing)
|
||||
{
|
||||
mobj_t *mo;
|
||||
if (overlaycap == thing)
|
||||
{
|
||||
P_SetTarget(&overlaycap, thing->hnext);
|
||||
P_SetTarget(&thing->hnext, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
for (mo = overlaycap; mo; mo = mo->hnext)
|
||||
if (mo->hnext == thing)
|
||||
{
|
||||
P_SetTarget(&mo->hnext, thing->hnext);
|
||||
P_SetTarget(&thing->hnext, NULL);
|
||||
return;
|
||||
}
|
||||
{
|
||||
if (mo->hnext != thing)
|
||||
continue;
|
||||
|
||||
P_SetTarget(&mo->hnext, thing->hnext);
|
||||
P_SetTarget(&thing->hnext, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void P_RunShadows(void)
|
||||
@@ -6175,12 +6184,14 @@ static void P_RemoveShadow(mobj_t *thing)
|
||||
}
|
||||
|
||||
for (mo = shadowcap; mo; mo = mo->hnext)
|
||||
if (mo->hnext == thing)
|
||||
{
|
||||
P_SetTarget(&mo->hnext, thing->hnext);
|
||||
P_SetTarget(&thing->hnext, NULL);
|
||||
return;
|
||||
}
|
||||
{
|
||||
if (mo->hnext != thing)
|
||||
continue;
|
||||
|
||||
P_SetTarget(&mo->hnext, thing->hnext);
|
||||
P_SetTarget(&thing->hnext, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void A_BossDeath(mobj_t *mo);
|
||||
|
||||
@@ -918,6 +918,8 @@ void P_PreTicker(INT32 frames)
|
||||
// Run shield positioning
|
||||
//P_RunShields();
|
||||
P_RunOverlays();
|
||||
|
||||
P_RunShadows();
|
||||
|
||||
P_UpdateSpecials();
|
||||
P_RespawnSpecials();
|
||||
|
||||
Reference in new issue
Block a user