From 52bb3a4dbec4a928ea8ce814eb295795e8d9ef63 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 12 Apr 2012 12:42:00 +0000 Subject: [PATCH] - fixed: Boom's generalized doors are not retriggerable, even if they are not remote. (Patch by Gez) SVN r3555 (trunk) --- src/p_doors.cpp | 7 +++++-- src/p_lnspec.cpp | 7 +++++-- src/p_spec.h | 4 ++-- wadsrc/static/xlat/base.txt | 8 ++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/p_doors.cpp b/src/p_doors.cpp index 0c815313f..b530f688d 100644 --- a/src/p_doors.cpp +++ b/src/p_doors.cpp @@ -412,7 +412,7 @@ DDoor::DDoor (sector_t *sec, EVlDoor type, fixed_t speed, int delay, int lightTa //============================================================================ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing, - int tag, int speed, int delay, int lock, int lightTag) + int tag, int speed, int delay, int lock, int lightTag, bool boomgen) { bool rtn = false; int secnum; @@ -440,6 +440,9 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing, // if door already has a thinker, use it if (sec->PlaneMoving(sector_t::ceiling)) { + // Boom used remote door logic for generalized doors, even if they are manual + if (boomgen) + return false; if (sec->ceilingdata->IsKindOf (RUNTIME_CLASS(DDoor))) { DDoor *door = barrier_cast(sec->ceilingdata); @@ -485,7 +488,7 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing, while ((secnum = P_FindSectorFromTag (tag,secnum)) >= 0) { sec = §ors[secnum]; - // if the ceiling already moving, don't start the door action + // if the ceiling is already moving, don't start the door action if (sec->PlaneMoving(sector_t::ceiling)) continue; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 55c4b771b..0c84ca4ee 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -252,8 +252,9 @@ FUNC(LS_Generic_Door) { int tag, lightTag; DDoor::EVlDoor type; + bool boomgen = false; - switch (arg2 & 127) + switch (arg2 & 63) { case 0: type = DDoor::doorRaise; break; case 1: type = DDoor::doorOpen; break; @@ -261,6 +262,8 @@ FUNC(LS_Generic_Door) case 3: type = DDoor::doorClose; break; default: return false; } + // Boom doesn't allow manual generalized doors to be activated while they move + if (arg2 & 64) boomgen = true; if (arg2 & 128) { // New for 2.0.58: Finally support BOOM's local door light effect @@ -272,7 +275,7 @@ FUNC(LS_Generic_Door) tag = arg0; lightTag = 0; } - return EV_DoDoor (type, ln, it, tag, SPEED(arg1), OCTICS(arg3), arg4, lightTag); + return EV_DoDoor (type, ln, it, tag, SPEED(arg1), OCTICS(arg3), arg4, lightTag, boomgen); } FUNC(LS_Floor_LowerByValue) diff --git a/src/p_spec.h b/src/p_spec.h index 55408e6c6..d30fb4f83 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -535,7 +535,7 @@ protected: friend bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing, int tag, int speed, int delay, int lock, - int lightTag); + int lightTag, bool boomgen); friend void P_SpawnDoorCloseIn30 (sector_t *sec); friend void P_SpawnDoorRaiseIn5Mins (sector_t *sec); private: @@ -545,7 +545,7 @@ private: bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing, int tag, int speed, int delay, int lock, - int lightTag); + int lightTag, bool boomgen = false); void P_SpawnDoorCloseIn30 (sector_t *sec); void P_SpawnDoorRaiseIn5Mins (sector_t *sec); diff --git a/wadsrc/static/xlat/base.txt b/wadsrc/static/xlat/base.txt index 93bb0cc1f..44d5457b2 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -494,10 +494,10 @@ include "xlat/defines.i" 0x0008 : D_NORMAL, 0x0010 : D_FAST, 0x0018 : D_TURBO] - arg3 = 0x0060 [0x0000 : 0, - 0x0020 : 1, - 0x0040 : 2, - 0x0060 : 3] + arg3 = 0x0060 [0x0000 : 64, + 0x0020 : 65, + 0x0040 : 66, + 0x0060 : 67] arg4 = 0x0300 [0x0000 : 8, 0x0100 : 34, 0x0200 : 69,