Merge branch 'Saturn-Next' into retrySOCK

This commit is contained in:
alufolie91 committed 2026-08-01 16:29:40 +02:00
commit e3fd46297a
1 file changed
+44 -33
+44 -33
View File
@@ -9150,15 +9150,17 @@ void P_MobjThinker(mobj_t *mobj)
tmfloorthing = tmhitthing = NULL;
const sector_t *sec1 = mobj->subsector ? mobj->subsector->sector : NULL;
// 970 allows ANY mobj to trigger a linedef exec
if (!mobj->islocal && sec1 && GETSECSPECIAL(sec1->special, 2) == 8) // BEWARE: islocal does not exist in vanilla
// do NOT trigger linedef executors for "local" mobjs
if (!mobj->islocal)
{
sector_t *sec2;
sec2 = P_ThingOnSpecial3DFloor(mobj);
if (sec2 && GETSECSPECIAL(sec2->special, 2) == 1)
P_LinedefExecute(sec2->tag, mobj, sec2);
// 970 allows ANY mobj to trigger a linedef exec
if (mobj->subsector && GETSECSPECIAL(mobj->subsector->sector->special, 2) == 8)
{
sector_t *sec2;
sec2 = P_ThingOnSpecial3DFloor(mobj);
if (sec2 && GETSECSPECIAL(sec2->special, 2) == 1)
P_LinedefExecute(sec2->tag, mobj, sec2);
}
}
if (mobj->scale != mobj->destscale)
@@ -9262,7 +9264,8 @@ void P_MobjThinker(mobj_t *mobj)
mobj->eflags &= ~MFE_JUSTHITFLOOR;
}
if (mobj->type == MT_FALLINGROCK
// Sliding physics for slidey mobjs!
if ( mobj->type == MT_FALLINGROCK
|| mobj->type == MT_LITTLETUMBLEWEED
|| mobj->type == MT_BIGTUMBLEWEED
|| mobj->type == MT_FLINGRING
@@ -9307,21 +9310,24 @@ void P_MobjThinker(mobj_t *mobj)
if (P_MobjWasRemoved(mobj))
return;
if (P_WeaponOrPanel(mobj->type))
if ((mobj->health == 0) && // Fading tile
(mobj->type == MT_BOUNCEPICKUP
|| mobj->type == MT_RAILPICKUP
|| mobj->type == MT_AUTOPICKUP
|| mobj->type == MT_EXPLODEPICKUP
|| mobj->type == MT_SCATTERPICKUP
|| mobj->type == MT_GRENADEPICKUP))
{
if (mobj->health == 0) // Fading tile
{
INT32 value = mobj->info->damage/10;
value = mobj->fuse/value;
value = 10-value;
value--;
INT32 value = mobj->info->damage/10;
value = mobj->fuse/value;
value = 10-value;
value--;
if (value <= 0)
value = 1;
if (value <= 0)
value = 1;
mobj->frame &= ~FF_TRANSMASK;
mobj->frame |= value << FF_TRANSSHIFT;
}
mobj->frame &= ~FF_TRANSMASK;
mobj->frame |= value << FF_TRANSSHIFT;
}
}
@@ -9358,25 +9364,29 @@ void P_PushableThinker(mobj_t *mobj)
I_Assert(!P_MobjWasRemoved(mobj));
if (P_MobjWasRemovedCompat(mobj))
return;
sec = mobj->subsector->sector;
if (mobj->z == sec->floorheight && GETSECSPECIAL(sec->special, 2) == 1)
P_LinedefExecute(sec->tag, mobj, sec);
// do NOT trigger linedef executors for "local" mobjs
if (!mobj->islocal)
{
sector_t *sec2;
sec = mobj->subsector->sector;
sec2 = P_ThingOnSpecial3DFloor(mobj);
if (sec2 && GETSECSPECIAL(sec2->special, 2) == 1)
P_LinedefExecute(sec2->tag, mobj, sec2);
if (mobj->z == sec->floorheight && GETSECSPECIAL(sec->special, 2) == 1)
P_LinedefExecute(sec->tag, mobj, sec);
{
sector_t *sec2;
sec2 = P_ThingOnSpecial3DFloor(mobj);
if (sec2 && GETSECSPECIAL(sec2->special, 2) == 1)
P_LinedefExecute(sec2->tag, mobj, sec2);
}
}
// it has to be pushable RIGHT NOW for this part to happen
if (mobj->flags & MF_PUSHABLE && !(mobj->momx || mobj->momy))
P_TryMove(mobj, mobj->x, mobj->y, true);
if (P_MobjWasRemovedCompat(mobj))
return;
if (mobj->fuse == 1) // it would explode in the MobjThinker code
{
mobj_t *spawnmo;
@@ -9402,7 +9412,8 @@ void P_PushableThinker(mobj_t *mobj)
}
spawnmo = P_SpawnMobj(x, y, z, mobj->type);
if (spawnmo)
if (!P_MobjWasRemovedCompat(spawnmo))
{
spawnmo->spawnpoint = mobj->spawnpoint;
P_UnsetThingPosition(spawnmo);