- Added a fourth paremeter to Floor_LowerToHighest. Set it to 1 to always apply

the offset to the target height. (This is Heretic's behavior.)

SVN r3304 (trunk)
This commit is contained in:
Randy Heit 2011-10-27 01:35:30 +00:00
parent 3d214602c4
commit de956a9ab6
5 changed files with 9 additions and 7 deletions

View file

@ -219,7 +219,7 @@ DEFINE_SPECIAL(Floor_RaiseToLowestCeiling, 238, 2, 2, 2)
DEFINE_SPECIAL(Floor_RaiseByValueTxTy, 239, 3, 3, 3)
DEFINE_SPECIAL(Floor_RaiseByTexture, 240, 2, 2, 2)
DEFINE_SPECIAL(Floor_LowerToLowestTxTy, 241, 2, 2, 2)
DEFINE_SPECIAL(Floor_LowerToHighest, 242, 3, 3, 3)
DEFINE_SPECIAL(Floor_LowerToHighest, 242, 3, 4, 4)
DEFINE_SPECIAL(Exit_Normal, 243, 1, 1, 1)
DEFINE_SPECIAL(Exit_Secret, 244, 1, 1, 1)
DEFINE_SPECIAL(Elevator_RaiseToNearest, 245, 2, 2, 2)

View file

@ -272,11 +272,12 @@ DFloor::DFloor (sector_t *sec)
//
// HANDLE FLOOR TYPES
// [RH] Added tag, speed, height, crush, change params.
// This functions starts too many different things.
//
//==========================================================================
bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush)
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower)
{
int secnum;
bool rtn;
@ -332,7 +333,7 @@ manual_floor:
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight);
// [RH] DOOM's turboLower type did this. I've just extended it
// to be applicable to all LowerToHighest types.
if (floor->m_FloorDestDist != sec->floorplane.d)
if (hereticlower || floor->m_FloorDestDist != sec->floorplane.d)
floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight+height);
break;

View file

@ -275,9 +275,9 @@ FUNC(LS_Floor_LowerToLowest)
}
FUNC(LS_Floor_LowerToHighest)
// Floor_LowerToHighest (tag, speed, adjust)
// Floor_LowerToHighest (tag, speed, adjust, hereticlower)
{
return EV_DoFloor (DFloor::floorLowerToHighest, ln, arg0, SPEED(arg1), (arg2-128)*FRACUNIT, 0, 0, false);
return EV_DoFloor (DFloor::floorLowerToHighest, ln, arg0, SPEED(arg1), (arg2-128)*FRACUNIT, 0, 0, false, arg3==1);
}
FUNC(LS_Floor_LowerToNearest)

View file

@ -755,7 +755,7 @@ protected:
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
int usespecials);
friend bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush);
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower=false);
friend bool EV_FloorCrushStop (int tag);
friend bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
private:
@ -766,7 +766,7 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line,
fixed_t stairsize, fixed_t speed, int delay, int reset, int igntxt,
int usespecials);
bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush);
fixed_t speed, fixed_t height, int crush, int change, bool hexencrush, bool hereticlower);
bool EV_FloorCrushStop (int tag);
bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);

View file

@ -3,6 +3,7 @@ include "xlat/base.txt"
7 = USE, Stairs_BuildUpDoom (tag, F_SLOW, 8)
8 = WALK, Stairs_BuildUpDoom (tag, F_SLOW, 8)
10 = WALK, Plat_DownWaitUpStayLip (tag, P_FAST, PLATWAIT, 0)
36 = WALK, Floor_LowerToHighest (tag, F_FAST, 136, 1)
88 = WALK|REP, Plat_DownWaitUpStayLip (tag, P_FAST, PLATWAIT, 0)
99 = 0, Scroll_Texture_Right (SCROLL_UNIT)
100 = WALK|REP, Door_Raise (tag, D_SLOW*3, VDOORWAIT)