- Fixed: EV_DoDonut, EV_DoElevator and EV_StartWaggle did not to any 0-tag checks.
SVN r2000 (trunk)
This commit is contained in:
parent
a3c28e2a2f
commit
233e662a92
4 changed files with 50 additions and 11 deletions
|
|
@ -770,7 +770,7 @@ manual_stair:
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed)
|
||||
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed)
|
||||
{
|
||||
sector_t* s1;
|
||||
sector_t* s2;
|
||||
|
|
@ -781,13 +781,24 @@ bool EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed)
|
|||
DFloor* floor;
|
||||
vertex_t* spot;
|
||||
fixed_t height;
|
||||
bool manual = false;
|
||||
|
||||
secnum = -1;
|
||||
rtn = false;
|
||||
|
||||
if (tag == 0)
|
||||
{
|
||||
if (!line || !(s1 = line->backsector))
|
||||
return rtn;
|
||||
manual = true;
|
||||
goto manual_donut;
|
||||
}
|
||||
|
||||
while ((secnum = P_FindSectorFromTag(tag,secnum)) >= 0)
|
||||
{
|
||||
s1 = §ors[secnum]; // s1 is pillar's sector
|
||||
|
||||
|
||||
manual_donut:
|
||||
// ALREADY MOVING? IF SO, KEEP GOING...
|
||||
if (s1->PlaneMoving(sector_t::floor))
|
||||
continue;
|
||||
|
|
@ -834,6 +845,7 @@ bool EV_DoDonut (int tag, fixed_t pillarspeed, fixed_t slimespeed)
|
|||
floor->StartFloorSound ();
|
||||
break;
|
||||
}
|
||||
if (manual) break;
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
|
@ -989,17 +1001,28 @@ bool EV_DoElevator (line_t *line, DElevator::EElevator elevtype,
|
|||
fixed_t floorheight, ceilingheight;
|
||||
fixed_t newheight;
|
||||
vertex_t* spot;
|
||||
bool manual = false;
|
||||
|
||||
if (!line && (elevtype == DElevator::elevateCurrent))
|
||||
return false;
|
||||
|
||||
secnum = -1;
|
||||
rtn = false;
|
||||
|
||||
if (tag == 0)
|
||||
{
|
||||
if (!line || !(sec = line->backsector))
|
||||
return rtn;
|
||||
manual = true;
|
||||
goto manual_elevator;
|
||||
}
|
||||
|
||||
|
||||
// act on all sectors with the same tag as the triggering linedef
|
||||
while ((secnum = P_FindSectorFromTag (tag, secnum)) >= 0)
|
||||
{
|
||||
sec = §ors[secnum];
|
||||
|
||||
manual_elevator:
|
||||
// If either floor or ceiling is already activated, skip it
|
||||
if (sec->PlaneMoving(sector_t::floor) || sec->ceilingdata) //jff 2/22/98
|
||||
continue;
|
||||
|
|
@ -1060,6 +1083,7 @@ bool EV_DoElevator (line_t *line, DElevator::EElevator elevtype,
|
|||
elevator->m_CeilingDestDist = sec->ceilingplane.PointToDist (sec->soundorg[0], sec->soundorg[1], ceilingheight - height);
|
||||
break;
|
||||
}
|
||||
if (manual) break;
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
|
@ -1307,19 +1331,31 @@ void DCeilingWaggle::Tick ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool EV_StartWaggle (int tag, int height, int speed, int offset,
|
||||
bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset,
|
||||
int timer, bool ceiling)
|
||||
{
|
||||
int sectorIndex;
|
||||
sector_t *sector;
|
||||
DWaggleBase *waggle;
|
||||
bool retCode;
|
||||
bool manual = false;
|
||||
|
||||
retCode = false;
|
||||
sectorIndex = -1;
|
||||
|
||||
if (tag == 0)
|
||||
{
|
||||
if (!line || !(sector = line->backsector))
|
||||
return retCode;
|
||||
manual = true;
|
||||
goto manual_waggle;
|
||||
}
|
||||
|
||||
|
||||
while ((sectorIndex = P_FindSectorFromTag(tag, sectorIndex)) >= 0)
|
||||
{
|
||||
sector = §ors[sectorIndex];
|
||||
manual_waggle:
|
||||
if ((!ceiling && sector->PlaneMoving(sector_t::floor)) ||
|
||||
(ceiling && sector->PlaneMoving(sector_t::ceiling)))
|
||||
{ // Already busy with another thinker
|
||||
|
|
@ -1344,6 +1380,7 @@ bool EV_StartWaggle (int tag, int height, int speed, int offset,
|
|||
/(TICRATE+((3*TICRATE)*height)/255);
|
||||
waggle->m_Ticker = timer ? timer*TICRATE : -1;
|
||||
waggle->m_State = WGLSTATE_EXPAND;
|
||||
if (manual) break;
|
||||
}
|
||||
return retCode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue