This commit is contained in:
Christoph Oelckers 2015-01-08 20:00:43 +01:00
commit 67b68e6b48
3 changed files with 22 additions and 10 deletions

View file

@ -519,19 +519,19 @@ FUNC(LS_Generic_Stairs)
FUNC(LS_Pillar_Build) FUNC(LS_Pillar_Build)
// Pillar_Build (tag, speed, height) // Pillar_Build (tag, speed, height)
{ {
return EV_DoPillar (DPillar::pillarBuild, arg0, SPEED(arg1), arg2*FRACUNIT, 0, -1, false); return EV_DoPillar (DPillar::pillarBuild, ln, arg0, SPEED(arg1), arg2*FRACUNIT, 0, -1, false);
} }
FUNC(LS_Pillar_BuildAndCrush) FUNC(LS_Pillar_BuildAndCrush)
// Pillar_BuildAndCrush (tag, speed, height, crush, crushtype) // Pillar_BuildAndCrush (tag, speed, height, crush, crushtype)
{ {
return EV_DoPillar (DPillar::pillarBuild, arg0, SPEED(arg1), arg2*FRACUNIT, 0, arg3, CRUSHTYPE(arg4)); return EV_DoPillar (DPillar::pillarBuild, ln, arg0, SPEED(arg1), arg2*FRACUNIT, 0, arg3, CRUSHTYPE(arg4));
} }
FUNC(LS_Pillar_Open) FUNC(LS_Pillar_Open)
// Pillar_Open (tag, speed, f_height, c_height) // Pillar_Open (tag, speed, f_height, c_height)
{ {
return EV_DoPillar (DPillar::pillarOpen, arg0, SPEED(arg1), arg2*FRACUNIT, arg3*FRACUNIT, -1, false); return EV_DoPillar (DPillar::pillarOpen, ln, arg0, SPEED(arg1), arg2*FRACUNIT, arg3*FRACUNIT, -1, false);
} }
FUNC(LS_Ceiling_LowerByValue) FUNC(LS_Ceiling_LowerByValue)

View file

@ -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, bool EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
fixed_t height2, int crush, bool hexencrush) fixed_t speed, fixed_t height, fixed_t height2, int crush, bool hexencrush)
{ {
int secnum;
sector_t *sec;
bool rtn = false; 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 = &sectors[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 = &sectors[secnum];
manual_pillar:
if (sec->PlaneMoving(sector_t::floor) || sec->PlaneMoving(sector_t::ceiling)) if (sec->PlaneMoving(sector_t::floor) || sec->PlaneMoving(sector_t::ceiling))
continue; continue;

View file

@ -515,8 +515,8 @@ private:
DPillar (); DPillar ();
}; };
bool EV_DoPillar (DPillar::EPillar type, int tag, fixed_t speed, fixed_t height, bool EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
fixed_t height2, int crush, bool hexencrush); fixed_t speed, fixed_t height, fixed_t height2, int crush, bool hexencrush);
// //
// P_DOORS // P_DOORS