- 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.
This commit is contained in:
Christoph Oelckers 2023-09-15 00:34:45 +02:00
parent 15521e5181
commit 096b9cdc4f
4 changed files with 11 additions and 1 deletions

View File

@ -272,6 +272,7 @@ DEFINE_SPECIAL(Ceiling_MoveToValueAndCrush, 280, 4, 5, 5)
DEFINE_SPECIAL(Line_SetAutomapFlags, 281, 3, 3, 3) DEFINE_SPECIAL(Line_SetAutomapFlags, 281, 3, 3, 3)
DEFINE_SPECIAL(Line_SetAutomapStyle, 282, 2, 2, 2) DEFINE_SPECIAL(Line_SetAutomapStyle, 282, 2, 2, 2)
DEFINE_SPECIAL(Polyobj_StopSound, 283, 1, 1, 1) DEFINE_SPECIAL(Polyobj_StopSound, 283, 1, 1, 1)
DEFINE_SPECIAL(Generic_CrusherDist, 284, 5, 5, 5)
DEFINE_SPECIAL(Line_QuickPortal, 301, -1, -1, 1) DEFINE_SPECIAL(Line_QuickPortal, 301, -1, -1, 1)

View File

@ -941,6 +941,13 @@ FUNC(LS_Generic_Crusher2)
SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, DCeiling::ECrushMode::crushHexen); 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) FUNC(LS_Plat_PerpetualRaise)
// Plat_PerpetualRaise (tag, speed, delay) // Plat_PerpetualRaise (tag, speed, delay)
{ {
@ -3863,6 +3870,7 @@ static lnSpecFunc LineSpecials[] =
/* 281 */ LS_Line_SetAutomapFlags, /* 281 */ LS_Line_SetAutomapFlags,
/* 282 */ LS_Line_SetAutomapStyle, /* 282 */ LS_Line_SetAutomapStyle,
/* 283 */ LS_Polyobj_StopSound, /* 283 */ LS_Polyobj_StopSound,
/* 284 */ LS_Generic_CrusherDist
}; };
#define DEFINE_SPECIAL(name, num, min, max, mmax) {#name, num, min, max, mmax}, #define DEFINE_SPECIAL(name, num, min, max, mmax) {#name, num, min, max, mmax},

View File

@ -82,6 +82,7 @@ void FHWModelRenderer::EndDrawModel(FRenderStyle style, FSpriteModelFrame *smf)
void FHWModelRenderer::BeginDrawHUDModel(FRenderStyle style, const VSMatrix &objectToWorldMatrix, bool mirrored) void FHWModelRenderer::BeginDrawHUDModel(FRenderStyle style, const VSMatrix &objectToWorldMatrix, bool mirrored)
{ {
state.SetDepthFunc(DF_LEqual); state.SetDepthFunc(DF_LEqual);
state.SetDepthClamp(true);
// [BB] In case the model should be rendered translucent, do back face culling. // [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. // This solves a few of the problems caused by the lack of depth sorting.

View File

@ -421,7 +421,7 @@ include "xlat/defines.i"
// Generalized crusher (tag, dnspeed, upspeed, silent, damage) // Generalized crusher (tag, dnspeed, upspeed, silent, damage)
[Generic_Crusher] (0x2f80, 0x2fff) [Generic_CrusherDist] (0x2f80, 0x2fff)
{ {
flags |= 0x0020 [0x0020 : MONST] flags |= 0x0020 [0x0020 : MONST]
arg2 = 0x0018 [0x0000 : C_SLOW, arg2 = 0x0018 [0x0000 : C_SLOW,