- Added zero tag handling for Pillar actions.
Pillar actions will refer to the back sector if the tag is set to 0.
This commit is contained in:
parent
83c6798651
commit
c3c22315d9
3 changed files with 22 additions and 10 deletions
|
|
@ -212,16 +212,28 @@ DPillar::DPillar (sector_t *sector, EPillar type, fixed_t speed,
|
|||
}
|
||||
}
|
||||
|
||||
bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height,
|
||||
fixed_t height2, int crush, bool hexencrush)
|
||||
bool EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
|
||||
fixed_t speed, fixed_t height, fixed_t height2, int crush, bool hexencrush)
|
||||
{
|
||||
int secnum;
|
||||
sector_t *sec;
|
||||
bool rtn = false;
|
||||
int secnum = -1;
|
||||
|
||||
while ((secnum = P_FindSectorFromTag (tag, secnum)) >= 0)
|
||||
// check if a manual trigger; if so do just the sector on the backside
|
||||
if (tag == 0)
|
||||
{
|
||||
sector_t *sec = §ors[secnum];
|
||||
if (!line || !(sec = line->backsector))
|
||||
return rtn;
|
||||
secnum = (int)(sec-sectors);
|
||||
goto manual_pillar;
|
||||
}
|
||||
|
||||
secnum = -1;
|
||||
while (tag && (secnum = P_FindSectorFromTag (tag, secnum)) >= 0)
|
||||
{
|
||||
sec = §ors[secnum];
|
||||
|
||||
manual_pillar:
|
||||
if (sec->PlaneMoving(sector_t::floor) || sec->PlaneMoving(sector_t::ceiling))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue