mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Revert "Merge branch 'random-fof-fixes' into fof-fixes-movingplatexists"
This reverts commitcc11459054
, reversing changes made to7e3d5cd373
.
This commit is contained in:
parent
b629104197
commit
231f19aaab
1 changed files with 14 additions and 30 deletions
|
@ -1839,7 +1839,6 @@ 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.
|
||||||
|
@ -1854,16 +1853,7 @@ 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 = §ors[secnum];
|
actionsector = §ors[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!
|
||||||
|
|
||||||
|
@ -1952,13 +1942,10 @@ 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)
|
||||||
{
|
S_StartSound(mp, sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS);
|
||||||
if (thwomp->sourceline->flags & ML_EFFECT4)
|
else
|
||||||
S_StartSound(mp, sides[thwomp->sourceline->sidenum[0]].textureoffset>>FRACBITS);
|
S_StartSound(mp, sfx_thwomp);
|
||||||
else
|
|
||||||
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
|
||||||
|
@ -1972,21 +1959,18 @@ 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!
|
||||||
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
{
|
{
|
||||||
// scan the thinkers to find players!
|
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
continue;
|
||||||
{
|
|
||||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
mo = (mobj_t *)th;
|
||||||
if (mo->type == MT_PLAYER && mo->health && mo->z <= thwomp->sector->ceilingheight
|
if (mo->type == MT_PLAYER && mo->health && mo->z <= thwomp->sector->ceilingheight
|
||||||
&& P_AproxDistance(thwompx - mo->x, thwompy - mo->y) <= 96*FRACUNIT)
|
&& P_AproxDistance(thwompx - mo->x, thwompy - mo->y) <= 96*FRACUNIT)
|
||||||
{
|
{
|
||||||
thwomp->direction = -1;
|
thwomp->direction = -1;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue