- fixed: A_CheckTerrain did not use the proper damage type for processing an instant death sector.

- moved sector secret information from sector_t::special and secretsector to two flag bits in sector_t::Flags.

This is to get rid of the bit masking madness in the floor/ceiling thinkers which need to preserve this bit when they change a sector's type.
This commit is contained in:
Christoph Oelckers 2016-01-06 01:50:45 +01:00
commit 6a63effa1f
15 changed files with 67 additions and 38 deletions

View file

@ -159,7 +159,7 @@ void DFloor::Tick ()
case donutRaise:
case genFloorChgT:
case genFloorChg0:
m_Sector->special = (m_Sector->special & SECRET_MASK) | m_NewSpecial;
m_Sector->special = m_Sector->special | m_NewSpecial;
//fall thru
case genFloorChg:
m_Sector->SetTexture(sector_t::floor, m_Texture);
@ -175,7 +175,7 @@ void DFloor::Tick ()
case floorLowerAndChange:
case genFloorChgT:
case genFloorChg0:
m_Sector->special = (m_Sector->special & SECRET_MASK) | m_NewSpecial;
m_Sector->special = m_Sector->special | m_NewSpecial;
//fall thru
case genFloorChg:
m_Sector->SetTexture(sector_t::floor, m_Texture);
@ -240,7 +240,7 @@ void DFloor::SetFloorChangeType (sector_t *sec, int change)
m_Type = DFloor::genFloorChg;
break;
case 3:
m_NewSpecial = sec->special & ~SECRET_MASK;
m_NewSpecial = sec->special;
m_Type = DFloor::genFloorChgT;
break;
}
@ -438,11 +438,11 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
{
FTextureID oldpic = sec->GetTexture(sector_t::floor);
sec->SetTexture(sector_t::floor, line->frontsector->GetTexture(sector_t::floor));
sec->special = (sec->special & SECRET_MASK) | (line->frontsector->special & ~SECRET_MASK);
sec->special = line->frontsector->special;
}
else
{
sec->special &= SECRET_MASK;
sec->special = 0;
}
break;
@ -454,7 +454,7 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
// jff 1/24/98 make sure floor->m_NewSpecial gets initialized
// in case no surrounding sector is at floordestheight
// --> should not affect compatibility <--
floor->m_NewSpecial = sec->special & ~SECRET_MASK;
floor->m_NewSpecial = sec->special;
//jff 5/23/98 use model subroutine to unify fixes and handling
sector_t *modelsec;
@ -462,7 +462,7 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
if (modelsec != NULL)
{
floor->m_Texture = modelsec->GetTexture(sector_t::floor);
floor->m_NewSpecial = modelsec->special & ~SECRET_MASK;
floor->m_NewSpecial = modelsec->special;
}
break;
@ -1091,7 +1091,7 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag)
if (line)
{ // [RH] if no line, no change
sec->SetTexture(sector_t::floor, line->frontsector->GetTexture(sector_t::floor));
sec->special = (sec->special & SECRET_MASK) | (line->frontsector->special & ~SECRET_MASK);
sec->special = line->frontsector->special;
}
break;
case numChangeOnly: