diff --git a/src/actionspecials.h b/src/actionspecials.h index eee1c9589d..a1d34a54f3 100644 --- a/src/actionspecials.h +++ b/src/actionspecials.h @@ -146,6 +146,7 @@ DEFINE_SPECIAL(Sector_Set3DFloor, 160, -1, -1, 5) DEFINE_SPECIAL(Sector_SetContents, 161, -1, -1, 3) // [RH] Begin new specials for ZDoom +DEFINE_SPECIAL(Ceiling_CrushAndRaiseDist, 168, 3, 5, 5) DEFINE_SPECIAL(Generic_Crusher2, 169, 5, 5, 5) DEFINE_SPECIAL(Sector_SetCeilingScale2, 170, 3, 3, 3) DEFINE_SPECIAL(Sector_SetFloorScale2, 171, 3, 3, 3) diff --git a/src/p_ceiling.cpp b/src/p_ceiling.cpp index fdac779ac5..426bdf5070 100644 --- a/src/p_ceiling.cpp +++ b/src/p_ceiling.cpp @@ -133,6 +133,7 @@ void DCeiling::Tick () switch (m_Type) { case ceilCrushAndRaise: + case ceilCrushAndRaiseDist: m_Direction = -1; m_Speed = m_Speed1; if (!SN_IsMakingLoopingSound (m_Sector)) @@ -164,6 +165,7 @@ void DCeiling::Tick () switch (m_Type) { case ceilCrushAndRaise: + case ceilCrushAndRaiseDist: case ceilCrushRaiseAndStay: m_Speed = m_Speed2; m_Direction = 1; @@ -193,6 +195,7 @@ void DCeiling::Tick () switch (m_Type) { case ceilCrushAndRaise: + case ceilCrushAndRaiseDist: case ceilLowerAndCrush: case ceilLowerAndCrushDist: if (m_Speed1 == FRACUNIT && m_Speed2 == FRACUNIT) @@ -254,6 +257,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line, switch (type) { case ceilCrushAndRaise: + case ceilCrushAndRaiseDist: case ceilCrushRaiseAndStay: ceiling->m_TopHeight = sec->ceilingplane.d; case ceilLowerAndCrush: @@ -263,7 +267,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line, { targheight += 8*FRACUNIT; } - else if (type == ceilLowerAndCrushDist) + else if (type == ceilLowerAndCrushDist || type == ceilCrushAndRaiseDist) { targheight += height; } @@ -505,7 +509,7 @@ bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line, // Reactivate in-stasis ceilings...for certain types. // This restarts a crusher after it has been stopped - if (type == DCeiling::ceilCrushAndRaise) + if (type == DCeiling::ceilCrushAndRaise || type == DCeiling::ceilCrushAndRaiseDist) { P_ActivateInStasisCeiling (tag); } diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 8cbeec3358..dd66fdb0f8 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -616,6 +616,12 @@ FUNC(LS_Ceiling_CrushAndRaiseA) return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg2), 0, arg3, 0, 0, CRUSHTYPE(arg4)); } +FUNC(LS_Ceiling_CrushAndRaiseDist) +// Ceiling_CrushAndRaiseDist (tag, dist, speed, damage, crushtype) +{ + return EV_DoCeiling (DCeiling::ceilCrushAndRaiseDist, ln, arg0, SPEED(arg2), SPEED(arg2), arg1*FRACUNIT, arg3, 0, 0, CRUSHTYPE(arg4)); +} + FUNC(LS_Ceiling_CrushAndRaiseSilentA) // Ceiling_CrushAndRaiseSilentA (tag, dnspeed, upspeed, damage, crushtype) { @@ -3248,13 +3254,13 @@ lnSpecFunc LineSpecials[256] = /* 159 */ LS_NOP, // Sector_SetPlaneReflection in GZDoom /* 160 */ LS_NOP, // Sector_Set3DFloor in GZDoom and Vavoom /* 161 */ LS_NOP, // Sector_SetContents in GZDoom and Vavoom - /* 162 */ LS_NOP, - /* 163 */ LS_NOP, - /* 164 */ LS_NOP, - /* 165 */ LS_NOP, - /* 166 */ LS_NOP, - /* 167 */ LS_NOP, - /* 168 */ LS_NOP, + /* 162 */ LS_NOP, // Reserved Doom64 branch + /* 163 */ LS_NOP, // Reserved Doom64 branch + /* 164 */ LS_NOP, // Reserved Doom64 branch + /* 165 */ LS_NOP, // Reserved Doom64 branch + /* 166 */ LS_NOP, // Reserved Doom64 branch + /* 167 */ LS_NOP, // Reserved Doom64 branch + /* 168 */ LS_Ceiling_CrushAndRaiseDist, /* 169 */ LS_Generic_Crusher2, /* 170 */ LS_Sector_SetCeilingScale2, /* 171 */ LS_Sector_SetFloorScale2, diff --git a/src/p_spec.h b/src/p_spec.h index 96bd4c8eec..b1a0048f40 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -603,6 +603,7 @@ public: ceilLowerInstant, ceilRaiseInstant, ceilCrushAndRaise, + ceilCrushAndRaiseDist, ceilLowerAndCrush, ceilLowerAndCrushDist, ceilCrushRaiseAndStay, diff --git a/wadsrc/static/xlat/base.txt b/wadsrc/static/xlat/base.txt index c5c7d71052..93bb0cc1fd 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -48,7 +48,7 @@ include "xlat/defines.i" 46 = SHOOT|REP|MONST, Door_Open (tag, D_SLOW) 47 = SHOOT, Plat_RaiseAndStayTx0 (tag, P_SLOW/2) 48 = 0, Scroll_Texture_Left (SCROLL_UNIT) - 49 = USE, Ceiling_CrushAndRaiseA (tag, C_SLOW, C_SLOW, 10) + 49 = USE, Ceiling_CrushAndRaiseDist (tag, 8, C_SLOW, 10) 50 = USE, Door_Close (tag, D_SLOW) 51 = USE, Exit_Secret (0) 52 = WALK, Exit_Normal (0) diff --git a/wadsrc/static/xlat/heretic.txt b/wadsrc/static/xlat/heretic.txt index 2ed3748b39..8fe344f5be 100644 --- a/wadsrc/static/xlat/heretic.txt +++ b/wadsrc/static/xlat/heretic.txt @@ -4,6 +4,7 @@ include "xlat/base.txt" 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) + 49 = USE, Ceiling_LowerAndCrush (tag, C_SLOW, 0, 2) 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) diff --git a/wadsrc/static/xlat/strife.txt b/wadsrc/static/xlat/strife.txt index 3d06cd7cda..f0320f04eb 100644 --- a/wadsrc/static/xlat/strife.txt +++ b/wadsrc/static/xlat/strife.txt @@ -244,7 +244,7 @@ RetailOnly = 121 189 = USE, ACS_LockedExecute (0, 0, 189, tag, 13) 41 = USE, Ceiling_LowerToFloor (tag, C_SLOW) 71 = USE, Floor_LowerToHighest (tag, F_FAST, 128) - 49 = USE, Ceiling_CrushAndRaiseA (tag, C_SLOW, C_SLOW, 10) + 49 = USE, Ceiling_CrushAndRaiseDist (tag, 8, C_SLOW, 0, 2) 50 = USE, Door_Close (tag, D_SLOW) 51 = USE, Teleport_EndGame (0) 55 = USE, Floor_RaiseAndCrush (tag, F_SLOW, 10, 2)