Merge branch 'no-crushma-thanks' into 'master'

Monkey-patch likely cause of Eggshrine crash

See merge request kart-krew-dev/ring-racers-internal!2805
This commit is contained in:
Eidolon 2025-09-11 15:12:25 -05:00
commit ec70f62f36

View file

@ -1237,13 +1237,14 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
} }
// If you CAN recieve points, get them! // If you CAN recieve points, get them!
if ((gametyperules & GTR_POINTLIMIT) && (source && source->player)) if ((gametyperules & GTR_POINTLIMIT)
&& (source && !P_MobjWasRemoved(source) && source->player))
{ {
K_GivePointsToPlayer(source->player, NULL, 1); K_GivePointsToPlayer(source->player, NULL, 1);
} }
targetdamaging_t targetdamaging = UFOD_GENERIC; targetdamaging_t targetdamaging = UFOD_GENERIC;
if (P_MobjWasRemoved(inflictor) == true) if (!inflictor || P_MobjWasRemoved(inflictor) == true)
; ;
else switch (inflictor->type) else switch (inflictor->type)
{ {
@ -1342,6 +1343,10 @@ static void P_AddBrokenPrison(mobj_t *target, mobj_t *inflictor, mobj_t *source)
secretextratime = TICRATE/2; secretextratime = TICRATE/2;
} }
// Everything below dependent on our coords
if (!target || P_MobjWasRemoved(target))
return;
// Prison Egg challenge drops (CDs, etc) // Prison Egg challenge drops (CDs, etc)
#ifdef DEVELOP #ifdef DEVELOP
extern consvar_t cv_debugprisoncd; extern consvar_t cv_debugprisoncd;