From de956a9ab63222110987072f7a59ba14c9f9120b Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 27 Oct 2011 01:35:30 +0000 Subject: [PATCH] - 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) --- src/actionspecials.h | 2 +- src/p_floor.cpp | 5 +++-- src/p_lnspec.cpp | 4 ++-- src/p_spec.h | 4 ++-- wadsrc/static/xlat/heretic.txt | 1 + 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/actionspecials.h b/src/actionspecials.h index 6e77bff7a..722742613 100644 --- a/src/actionspecials.h +++ b/src/actionspecials.h @@ -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) diff --git a/src/p_floor.cpp b/src/p_floor.cpp index d18a908b6..e0381e733 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -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; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index eb1c2b1c0..96c9ac465 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -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) diff --git a/src/p_spec.h b/src/p_spec.h index 19de4ce8a..547154c19 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -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); diff --git a/wadsrc/static/xlat/heretic.txt b/wadsrc/static/xlat/heretic.txt index 8a2b696bc..2ed3748b3 100644 --- a/wadsrc/static/xlat/heretic.txt +++ b/wadsrc/static/xlat/heretic.txt @@ -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)