From 24ae5ff65a6564b9fd089d02bde45a8f9639d1c9 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 13 Feb 2023 15:12:53 +0000 Subject: [PATCH] Repair Linedef types 403 and 404 - P_ProcessSpecial: Correct likely copypaste error in desired plane height and texture - Was using sector floor's height and texture instead of ceiling's. - P_ConvertBinaryLinedefTypes: assign affected plane in a saner way - Resolves issue #429 --- src/p_setup.c | 2 +- src/p_spec.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 52fac78c5..bedb39c78 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4999,7 +4999,7 @@ static void P_ConvertBinaryLinedefTypes(void) case 404: //Copy-move tagged sector's ceiling height/texture lines[i].args[0] = 0; lines[i].args[1] = tag; - lines[i].args[2] = lines[i].special - 403; + lines[i].args[2] = (lines[i].special == 403) ? TMP_FLOOR : TMP_CEILING; lines[i].args[3] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS; lines[i].args[4] = (lines[i].flags & ML_BLOCKPLAYERS) ? sides[lines[i].sidenum[0]].textureoffset >> FRACBITS : 0; lines[i].args[5] = !!(lines[i].flags & ML_NOCLIMB); diff --git a/src/p_spec.c b/src/p_spec.c index 40501ff62..95f9d923f 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2627,10 +2627,10 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha { EV_DoMoveCeilingByHeight( args[1], - copySector->floorheight, + copySector->ceilingheight, args[3] << (FRACBITS - 3), args[4], - args[5] ? copySector->floorpic : -1 + args[5] ? copySector->ceilingpic : -1 ); } }