From f714966c8364db3871edd59e82ead563864c641b Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 12 Dec 2021 08:27:27 +0100 Subject: [PATCH 01/12] Remove outdated linedef type check in HWR_ProcessSeg --- src/hardware/hw_main.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9bade3d6f..d187b0897 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1434,34 +1434,10 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // set alpha for transparent walls // ooops ! this do not work at all because render order we should render it in backtofront order - switch (gl_linedef->special) - { - // Translucent - case 102: - case 121: - case 123: - case 124: - case 125: - case 141: - case 142: - case 144: - case 145: - case 174: - case 175: - case 192: - case 195: - case 221: - case 253: - case 256: - blendmode = PF_Translucent; - break; - default: - if (gl_linedef->alpha >= 0 && gl_linedef->alpha < FRACUNIT) - blendmode = HWR_TranstableToAlpha(R_GetLinedefTransTable(gl_linedef->alpha), &Surf); - else - blendmode = PF_Masked; - break; - } + if (gl_linedef->alpha >= 0 && gl_linedef->alpha < FRACUNIT) + blendmode = HWR_TranstableToAlpha(R_GetLinedefTransTable(gl_linedef->alpha), &Surf); + else + blendmode = PF_Masked; if (gl_curline->polyseg && gl_curline->polyseg->translucency > 0) { From 8e4cbf8b76f662578425ea92d63602f74e17de84 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Fri, 31 Dec 2021 15:33:47 +0100 Subject: [PATCH 02/12] Disable ML_EFFECT5 on linedef executor triggers for UDMF maps (what a pointless feature) --- src/p_spec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 408b43478..c548a32ca 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1648,7 +1648,7 @@ static boolean P_ActivateLinedefExecutorsInSector(line_t *triggerline, mobj_t *a size_t linecnt = ctlsector->linecount; size_t i; - if (triggerline->flags & ML_EFFECT5) // disregard order for efficiency + if (!udmf && triggerline->flags & ML_EFFECT5) // disregard order for efficiency { for (i = 0; i < linecnt; i++) P_ActivateLinedefExecutor(ctlsector->lines[i], actor, caller); From 7609f300bad0ed2b8cbfaa8dd63818b0d86dcc3e Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:45:36 +0100 Subject: [PATCH 03/12] Fix typo in laser FOF conversion --- src/p_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index fd8b19f1c..057ccb45e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3557,10 +3557,10 @@ static void P_ConvertBinaryMap(void) //Flags if (lines[i].flags & ML_EFFECT1) - lines[i].args[2] = TMFL_NOBOSSES; + lines[i].args[2] |= TMFL_NOBOSSES; //Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels if (lines[i].flags & ML_EFFECT6 || lines[i].args[1] == 256) - lines[i].args[2] = TMFL_SPLAT; + lines[i].args[2] |= TMFL_SPLAT; break; case 259: //Custom FOF From e0ed58f577f1bd0662244cf1dc2e192a66232abd Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:49:28 +0100 Subject: [PATCH 04/12] Fix UDB config typo --- extras/conf/udb/Includes/SRB222_linedefs.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 4169548cf..c99ed4bab 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -3384,7 +3384,7 @@ udmf 602 { - title = "Start Adjustable Pulsating Light"; + title = "Adjustable Pulsating Light"; prefix = "(602)"; arg0 { @@ -3442,7 +3442,7 @@ udmf 604 { - title = "Start Adjustable Blinking Light"; + title = "Adjustable Blinking Light"; prefix = "(604)"; arg0 { From 6cc7cc3276b8e256c7cf1ec836071fbbb9b6db9d Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:50:34 +0100 Subject: [PATCH 05/12] Fix UDB config typo --- extras/conf/udb/Includes/SRB222_linedefs.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index cf51d9a9a..8c0b208a7 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -2731,7 +2731,7 @@ udmf type = 12; enum { - 1 = "Add to current translucency"; + 1 = "Add to current light level"; 2 = "Interrupt ongoing fades"; 4 = "Speed is duration"; } From 46ad1e4a5cf279891387eb2bc3d2ad442446ca45 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:54:43 +0100 Subject: [PATCH 06/12] UDB config: Move thing type args from Doom section to UDMF section --- extras/conf/udb/Includes/SRB222_things.cfg | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 0cb0287c5..28347c5e9 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -258,11 +258,6 @@ doom sprite = "TRETA1"; width = 16; height = 32; - arg0 - { - title = "Death trigger tag"; - type = 15; - } } 111 { @@ -2709,11 +2704,6 @@ doom sprite = "KOOPA0"; width = 16; height = 48; - arg0 - { - title = "Death trigger tag"; - type = 15; - } } 1807 { @@ -2721,11 +2711,6 @@ doom sprite = "MAXEA0"; width = 8; height = 16; - arg0 - { - title = "Death trigger tag"; - type = 15; - } } 1808 { @@ -3640,6 +3625,11 @@ udmf sprite = "TRETA1"; width = 16; height = 32; + arg0 + { + title = "Death trigger tag"; + type = 15; + } } 111 { @@ -7471,6 +7461,11 @@ udmf sprite = "KOOPA0"; width = 16; height = 48; + arg0 + { + title = "Death trigger tag"; + type = 15; + } } 1807 { @@ -7478,6 +7473,11 @@ udmf sprite = "MAXEA0"; width = 8; height = 16; + arg0 + { + title = "Death trigger tag"; + type = 15; + } } 1808 { From 9d67420e5caa4224894ce6932157fc484057815f Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:57:14 +0100 Subject: [PATCH 07/12] Egg Slimer: Fix typo in binary-to-UDMF conversion and invert speed-up flag --- extras/conf/udb/Includes/SRB222_things.cfg | 2 +- src/p_mobj.c | 2 +- src/p_setup.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 28347c5e9..dea20c9c6 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -4031,7 +4031,7 @@ udmf { title = "Speed up when hit?"; type = 11; - enum = "noyes"; + enum = "yesno"; } } 202 diff --git a/src/p_mobj.c b/src/p_mobj.c index 46510200e..f70c11218 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12731,7 +12731,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean } break; case MT_EGGMOBILE2: - if (mthing->args[5]) + if (!mthing->args[5]) mobj->flags2 |= MF2_AMBUSH; break; case MT_EGGMOBILE3: diff --git a/src/p_setup.c b/src/p_setup.c index 77d009194..16faee251 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4989,8 +4989,8 @@ static void P_ConvertBinaryMap(void) case 136: //Pyre Fly mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); break; - case 202: //Egg Slimer - mapthings[i].args[5] = !!(mapthings[i].options & MTF_AMBUSH); + case 201: //Egg Slimer + mapthings[i].args[5] = !(mapthings[i].options & MTF_AMBUSH); break; case 203: //Egg Colosseum mapthings[i].args[5] = LE_BOSS4DROP + mapthings[i].extrainfo * LE_PARAMWIDTH; From 88fae019a2fece3af15f68b250f8e30253fbe954 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 19:59:51 +0100 Subject: [PATCH 08/12] Fix typos in binary-to-UDMF conversion --- src/p_setup.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 16faee251..bed7291f3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -5121,13 +5121,13 @@ static void P_ConvertBinaryMap(void) mapthings[i].args[0] = !(mapthings[i].options & MTF_AMBUSH); break; case 700: //Water ambience A - case 701: //Water ambience A - case 702: //Water ambience A - case 703: //Water ambience A - case 704: //Water ambience A - case 705: //Water ambience A - case 706: //Water ambience A - case 707: //Water ambience A + case 701: //Water ambience B + case 702: //Water ambience C + case 703: //Water ambience D + case 704: //Water ambience E + case 705: //Water ambience F + case 706: //Water ambience G + case 707: //Water ambience H mapthings[i].args[0] = 35; P_WriteConstant(sfx_amwtr1 + mapthings[i].type - 700, &mapthings[i].stringargs[0]); mapthings[i].type = 700; From 70a28bad9456e3085b6714d059259faefab7a6e4 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 20:02:58 +0100 Subject: [PATCH 09/12] Gas jet: Fix typo in UDB config --- extras/conf/udb/Includes/SRB222_things.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index dea20c9c6..2ddf6c80a 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -5029,7 +5029,7 @@ udmf { title = "Play sound?"; type = 11; - enum = "noyes"; + enum = "yesno"; } } 542 From 8291d433cb65efc3cc7aa892978806b8f29a0c00 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 4 Jan 2022 20:05:21 +0100 Subject: [PATCH 10/12] Chained spring: Correct flag description in UDB config --- extras/conf/udb/Includes/SRB222_things.cfg | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extras/conf/udb/Includes/SRB222_things.cfg b/extras/conf/udb/Includes/SRB222_things.cfg index 2ddf6c80a..c5a881c5c 100644 --- a/extras/conf/udb/Includes/SRB222_things.cfg +++ b/extras/conf/udb/Includes/SRB222_things.cfg @@ -5999,7 +5999,17 @@ udmf { title = "Flags"; type = 12; - enum = "maceflags"; + enum + { + 1 = "Red spring"; + 2 = "No sounds"; + 4 = "Player-turnable chain"; + 8 = "Swing instead of spin"; + 16 = "Make chain from end item"; + 32 = "Spawn link at origin"; + 64 = "Clip inside ground"; + 128 = "No distance check"; + } } } 1107 From a8e32cfe12914864677b3bef202df5de24c58db6 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Wed, 5 Jan 2022 00:26:10 +0100 Subject: [PATCH 11/12] Fix incorrect turnaround behavior for bounceFloor and bounceCeiling --- src/p_ceilng.c | 7 +++++-- src/p_floor.c | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/p_ceilng.c b/src/p_ceilng.c index ed385be33..aa31e4301 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -86,14 +86,17 @@ void T_MoveCeiling(ceiling_t *ceiling) if (dest == lines[ceiling->sourceline].frontsector->ceilingheight) { dest = lines[ceiling->sourceline].backsector->ceilingheight; - ceiling->speed = ceiling->origspeed = lines[ceiling->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3] + ceiling->origspeed = lines[ceiling->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3] } else { dest = lines[ceiling->sourceline].frontsector->ceilingheight; - ceiling->speed = ceiling->origspeed = lines[ceiling->sourceline].args[2] << (FRACBITS - 2); // going frontways, use args[2] + ceiling->origspeed = lines[ceiling->sourceline].args[2] << (FRACBITS - 2); // going frontways, use args[2] } + if (ceiling->type == bounceCeilingCrush) + ceiling->speed = ceiling->origspeed; + if (dest < ceiling->sector->ceilingheight) // must move down { ceiling->direction = -1; diff --git a/src/p_floor.c b/src/p_floor.c index 7f1a7c2e0..1d7cc3f5b 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -206,13 +206,15 @@ void T_MoveFloor(floormove_t *movefloor) if (movefloor->floordestheight == lines[movefloor->sourceline].frontsector->floorheight) { movefloor->floordestheight = lines[movefloor->sourceline].backsector->floorheight; - movefloor->speed = movefloor->origspeed = lines[movefloor->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3] + movefloor->origspeed = lines[movefloor->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3] } else { movefloor->floordestheight = lines[movefloor->sourceline].frontsector->floorheight; - movefloor->speed = movefloor->origspeed = lines[movefloor->sourceline].args[2] << (FRACBITS - 2); // forward again, use args[2] + movefloor->origspeed = lines[movefloor->sourceline].args[2] << (FRACBITS - 2); // forward again, use args[2] } + if (movefloor->type == bounceFloorCrush) + movefloor->speed = movefloor->origspeed; movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1; movefloor->delaytimer = movefloor->delay; remove = false; From ce29d05be8eca83d8409527af2bb1f91c687ef6b Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 9 Jan 2022 12:53:12 +0100 Subject: [PATCH 12/12] Fix typo in wall scroller conversion --- src/p_setup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 1ecd24471..01daa55f1 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3816,13 +3816,13 @@ static void P_ConvertBinaryMap(void) lines[i].special = 0; break; } - lines[i].args[1] = sides[lines[i].sidenum[1]].rowoffset >> FRACBITS; - lines[i].args[2] = sides[lines[i].sidenum[1]].textureoffset >> FRACBITS; + lines[i].args[1] = sides[lines[i].sidenum[1]].textureoffset >> FRACBITS; + lines[i].args[2] = sides[lines[i].sidenum[1]].rowoffset >> FRACBITS; } else { - lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS; - lines[i].args[2] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; + lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; + lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS; } lines[i].special = 500; break;