From 096b9cdc4f139c937aaa4b37852c6ced029c7086 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Sep 2023 00:34:45 +0200 Subject: [PATCH] - fixed. Boom's generalized crushers must stop 8 units above the floor This required changing the special, so a new one was added to avoid altering Generic_Crusher. --- src/playsim/actionspecials.h | 1 + src/playsim/p_lnspec.cpp | 8 ++++++++ src/rendering/hwrenderer/hw_models.cpp | 1 + wadsrc/static/xlat/base.txt | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/playsim/actionspecials.h b/src/playsim/actionspecials.h index 2e5e95b72..7cfa43ce5 100644 --- a/src/playsim/actionspecials.h +++ b/src/playsim/actionspecials.h @@ -272,6 +272,7 @@ DEFINE_SPECIAL(Ceiling_MoveToValueAndCrush, 280, 4, 5, 5) DEFINE_SPECIAL(Line_SetAutomapFlags, 281, 3, 3, 3) DEFINE_SPECIAL(Line_SetAutomapStyle, 282, 2, 2, 2) DEFINE_SPECIAL(Polyobj_StopSound, 283, 1, 1, 1) +DEFINE_SPECIAL(Generic_CrusherDist, 284, 5, 5, 5) DEFINE_SPECIAL(Line_QuickPortal, 301, -1, -1, 1) diff --git a/src/playsim/p_lnspec.cpp b/src/playsim/p_lnspec.cpp index 88b37f8c3..0ac2c977e 100644 --- a/src/playsim/p_lnspec.cpp +++ b/src/playsim/p_lnspec.cpp @@ -941,6 +941,13 @@ FUNC(LS_Generic_Crusher2) SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, DCeiling::ECrushMode::crushHexen); } +FUNC(LS_Generic_CrusherDist) +// Generic_CrusherDist (tag, dnspeed, upspeed, silent, damage) +{ + return Level->EV_DoCeiling(DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), + SPEED(arg2), 8, arg4, arg3 ? 2 : 0, 0, (arg1 <= 24 && arg2 <= 24) ? DCeiling::ECrushMode::crushSlowdown : DCeiling::ECrushMode::crushDoom); +} + FUNC(LS_Plat_PerpetualRaise) // Plat_PerpetualRaise (tag, speed, delay) { @@ -3863,6 +3870,7 @@ static lnSpecFunc LineSpecials[] = /* 281 */ LS_Line_SetAutomapFlags, /* 282 */ LS_Line_SetAutomapStyle, /* 283 */ LS_Polyobj_StopSound, + /* 284 */ LS_Generic_CrusherDist }; #define DEFINE_SPECIAL(name, num, min, max, mmax) {#name, num, min, max, mmax}, diff --git a/src/rendering/hwrenderer/hw_models.cpp b/src/rendering/hwrenderer/hw_models.cpp index c6d568df7..b0fb572be 100644 --- a/src/rendering/hwrenderer/hw_models.cpp +++ b/src/rendering/hwrenderer/hw_models.cpp @@ -82,6 +82,7 @@ void FHWModelRenderer::EndDrawModel(FRenderStyle style, FSpriteModelFrame *smf) void FHWModelRenderer::BeginDrawHUDModel(FRenderStyle style, const VSMatrix &objectToWorldMatrix, bool mirrored) { state.SetDepthFunc(DF_LEqual); + state.SetDepthClamp(true); // [BB] In case the model should be rendered translucent, do back face culling. // This solves a few of the problems caused by the lack of depth sorting. diff --git a/wadsrc/static/xlat/base.txt b/wadsrc/static/xlat/base.txt index 99e5ec732..a53119b9e 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -421,7 +421,7 @@ include "xlat/defines.i" // Generalized crusher (tag, dnspeed, upspeed, silent, damage) -[Generic_Crusher] (0x2f80, 0x2fff) +[Generic_CrusherDist] (0x2f80, 0x2fff) { flags |= 0x0020 [0x0020 : MONST] arg2 = 0x0018 [0x0000 : C_SLOW,