From e9121b607dec72c8c01c6e287fc13fd48cf9dc2c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 4 Mar 2009 23:07:18 +0000 Subject: [PATCH] - Fixed: When using BOOM-style sector flags and specials together, the special was ignored unless it was "secret". SVN r1462 (trunk) --- docs/rh-log.txt | 2 ++ src/p_xlat.cpp | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 5bb9a335f8..c370b35e26 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ March 4, 2009 +- Fixed: When using BOOM-style sector flags and specials together, the + special was ignored unless it was "secret". - Fixed: One byte is too short for DUMB_IT_SIGRENDERER to store song tempo. Changed it to a word. - Went back to using RDTSC for timing on Win32. Ironically, diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp index b553350d0b..da5695ece2 100644 --- a/src/p_xlat.cpp +++ b/src/p_xlat.cpp @@ -343,17 +343,22 @@ int P_TranslateSectorSpecial (int special) if (newmask) { special &= ~newmask; - if (SectorMasks[i].op == 1) newmask <<= SectorMasks[i].shift; - else if (SectorMasks[i].op == -1) newmask >>= SectorMasks[i].shift; - else if (SectorMasks[i].op == 0 && SectorMasks[i].shift ==1) newmask = 0; + if (SectorMasks[i].op == 1) + newmask <<= SectorMasks[i].shift; + else if (SectorMasks[i].op == -1) + newmask >>= SectorMasks[i].shift; + else if (SectorMasks[i].op == 0 && SectorMasks[i].shift == 1) + newmask = 0; mask |= newmask; } } if ((unsigned)special < SectorTranslations.Size()) { - if (SectorTranslations[special].bitmask_allowed && mask) special = 0; - else special = SectorTranslations[special].newtype; + if (!SectorTranslations[special].bitmask_allowed && mask) + special = 0; + else + special = SectorTranslations[special].newtype; } return special | mask; }