- Fixed: The sector translators must clear unused bits because they might

render a sector's special inoperable.


SVN r844 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-23 20:52:34 +00:00
commit a6e9accedb
8 changed files with 17 additions and 11 deletions

View file

@ -330,13 +330,6 @@ int P_TranslateSectorSpecial (int special)
{
int mask = 0;
// Allow any supported sector special by or-ing 0x8000 to it in Doom format maps
// That's for those who like to mess around with existing maps. ;)
if (special & 0x8000)
{
return special & 0x7fff;
}
for(unsigned i = 0; i < SectorMasks.Size(); i++)
{
int newmask = special & SectorMasks[i].mask;
@ -345,6 +338,7 @@ int P_TranslateSectorSpecial (int special)
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;
mask |= newmask;
}
}