some P_MobjWasRemoved for non COMPAT_VANILLA builds
This commit is contained in:
1 parent
593540a3f9
commit
cabd8baae5
3 files changed
+43
-6
No files matched your search
+10
-2
@@ -4693,7 +4693,11 @@ void K_RepairOrbitChain(mobj_t *orbit)
|
||||
}
|
||||
|
||||
// Then recount to make sure item amount is correct
|
||||
if (orbit->target && orbit->target->player) // !P_MobjWasRemoved(orbit->target)
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (!P_MobjWasRemoved(orbit->target) && orbit->target->player)
|
||||
#else
|
||||
if (orbit->target && orbit->target->player)
|
||||
#endif
|
||||
{
|
||||
INT32 num = 0;
|
||||
|
||||
@@ -4710,7 +4714,11 @@ void K_RepairOrbitChain(mobj_t *orbit)
|
||||
prev->movedir = num;
|
||||
}
|
||||
|
||||
if (orbit->target) // !P_MobjWasRemoved(orbit->target)
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (!P_MobjWasRemoved(orbit->target))
|
||||
#else
|
||||
if (orbit->target)
|
||||
#endif
|
||||
orbit->target->player->kartstuff[k_itemamount] = num;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1466,8 +1466,11 @@ static void P_UpdateRemovedOrbital(mobj_t *target, mobj_t *inflictor, mobj_t *so
|
||||
{
|
||||
// SRB2kart
|
||||
// I wish I knew a better way to do this
|
||||
//if (!P_MobjWasRemoved(target->target) && target->target->player && !P_MobjWasRemoved(target->target->player->mo))
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (!P_MobjWasRemoved(target->target) && target->target->player && !P_MobjWasRemoved(target->target->player->mo))
|
||||
#else
|
||||
if (target->target && target->target->player && target->target->player->mo)
|
||||
#endif
|
||||
{
|
||||
if (target->target->player->kartstuff[k_eggmanheld] && target->type == MT_EGGMANITEM_SHIELD)
|
||||
target->target->player->kartstuff[k_eggmanheld] = 0;
|
||||
@@ -1480,7 +1483,11 @@ static void P_UpdateRemovedOrbital(mobj_t *target, mobj_t *inflictor, mobj_t *so
|
||||
{
|
||||
if (target->movedir != 0 && target->movedir < (UINT16)target->target->player->kartstuff[k_itemamount])
|
||||
{
|
||||
if (target->target->hnext) // !P_MobjWasRemoved(target->target->hnext))
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (!P_MobjWasRemoved(target->target->hnext))
|
||||
#else
|
||||
if (target->target->hnext)
|
||||
#endif
|
||||
K_KillBananaChain(target->target->hnext, inflictor, source);
|
||||
|
||||
target->target->player->kartstuff[k_itemamount] = 0;
|
||||
|
||||
+24
-2
@@ -3372,7 +3372,11 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
||||
I_Assert(mobj->player != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mobj));
|
||||
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
#else
|
||||
if (!mobj)
|
||||
#endif
|
||||
return;
|
||||
|
||||
P_MobjCheckWater(mobj);
|
||||
@@ -5614,7 +5618,11 @@ void P_SetScale(mobj_t *mobj, fixed_t newscale)
|
||||
player_t *player;
|
||||
fixed_t oldscale;
|
||||
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
#else
|
||||
if (!mobj)
|
||||
#endif
|
||||
return;
|
||||
|
||||
oldscale = mobj->scale; //keep for adjusting stuff below
|
||||
@@ -8962,7 +8970,11 @@ static boolean P_FuseThink(mobj_t *mobj)
|
||||
static boolean P_MobjPushableThink(mobj_t *mobj)
|
||||
{
|
||||
// would be cool if we could use P_MobjWasRemoved Zzz...
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
#else
|
||||
if (!mobj)
|
||||
#endif
|
||||
return false;
|
||||
|
||||
P_MobjCheckWater(mobj);
|
||||
@@ -9168,8 +9180,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||
{
|
||||
P_TryMove(mobj, mobj->x, mobj->y, true); // Sets mo->standingslope correctly
|
||||
|
||||
//if (P_MobjWasRemoved(mobj))
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj)) // anything that calls checkposition can be lethal
|
||||
#else
|
||||
if (!mobj) // anything that calls checkposition can be lethal
|
||||
#endif
|
||||
return;
|
||||
|
||||
P_ButteredSlope(mobj);
|
||||
@@ -9197,8 +9212,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||
}
|
||||
}
|
||||
|
||||
//if (P_MobjWasRemoved(mobj))
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
#else
|
||||
if (!mobj)
|
||||
#endif
|
||||
return; // obligatory paranoia check
|
||||
|
||||
// Can end up here if a player dies.
|
||||
@@ -9258,7 +9276,11 @@ void P_PushableThinker(mobj_t *mobj)
|
||||
|
||||
I_Assert(!P_MobjWasRemoved(mobj));
|
||||
|
||||
#ifndef COMPAT_VANILLA
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
#else
|
||||
if (!mobj)
|
||||
#endif
|
||||
return;
|
||||
|
||||
sec = mobj->subsector->sector;
|
||||
|
||||
Reference in new issue
Block a user