Merge branch 'random-fof-fixes' into fof-fixes-movingplatexists

This commit is contained in:
mazmazz 2018-09-08 00:37:04 -04:00
commit cc11459054

View file

@ -1839,6 +1839,7 @@ void T_ThwompSector(levelspecthink_t *thwomp)
#define ceilingwasheight vars[5] #define ceilingwasheight vars[5]
fixed_t thwompx, thwompy; fixed_t thwompx, thwompy;
sector_t *actionsector; sector_t *actionsector;
ffloor_t *rover = NULL;
INT32 secnum; INT32 secnum;
// If you just crashed down, wait a second before coming back up. // If you just crashed down, wait a second before coming back up.
@ -1853,7 +1854,16 @@ void T_ThwompSector(levelspecthink_t *thwomp)
secnum = P_FindSectorFromTag((INT16)thwomp->vars[0], -1); secnum = P_FindSectorFromTag((INT16)thwomp->vars[0], -1);
if (secnum > 0) if (secnum > 0)
{
actionsector = &sectors[secnum]; actionsector = &sectors[secnum];
// Look for thwomp FFloor
for (rover = actionsector->ffloors; rover; rover = rover->next)
{
if (rover->master == thwomp->sourceline)
break;
}
}
else else
return; // Bad bad bad! return; // Bad bad bad!
@ -1942,10 +1952,13 @@ void T_ThwompSector(levelspecthink_t *thwomp)
{ {
mobj_t *mp = (void *)&actionsector->soundorg; mobj_t *mp = (void *)&actionsector->soundorg;
if (!rover || (rover->flags & FF_EXISTS))
{
if (thwomp->sourceline->flags & ML_EFFECT4) if (thwomp->sourceline->flags & ML_EFFECT4)
S_StartSound(mp, sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS); S_StartSound(mp, sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS);
else else
S_StartSound(mp, sfx_thwomp); S_StartSound(mp, sfx_thwomp);
}
thwomp->direction = 1; // start heading back up thwomp->direction = 1; // start heading back up
thwomp->distance = TICRATE; // but only after a small delay thwomp->distance = TICRATE; // but only after a small delay
@ -1959,6 +1972,8 @@ void T_ThwompSector(levelspecthink_t *thwomp)
thinker_t *th; thinker_t *th;
mobj_t *mo; mobj_t *mo;
if (!rover || (rover->flags & FF_EXISTS))
{
// scan the thinkers to find players! // scan the thinkers to find players!
for (th = thinkercap.next; th != &thinkercap; th = th->next) for (th = thinkercap.next; th != &thinkercap; th = th->next)
{ {
@ -1973,6 +1988,7 @@ void T_ThwompSector(levelspecthink_t *thwomp)
break; break;
} }
} }
}
thwomp->sector->ceilspeed = 0; thwomp->sector->ceilspeed = 0;
thwomp->sector->floorspeed = 0; thwomp->sector->floorspeed = 0;