- handle intermediate special values in thinkers. They also need to take care of the related damage variables and flags.
This commit is contained in:
parent
bd8513c063
commit
eb6c855a95
7 changed files with 109 additions and 25 deletions
|
|
@ -161,7 +161,7 @@ void DFloor::Tick ()
|
|||
case donutRaise:
|
||||
case genFloorChgT:
|
||||
case genFloorChg0:
|
||||
m_Sector->xspecial = m_Sector->xspecial | m_NewSpecial;
|
||||
m_Sector->GetSpecial(&m_NewSpecial);
|
||||
//fall thru
|
||||
case genFloorChg:
|
||||
m_Sector->SetTexture(sector_t::floor, m_Texture);
|
||||
|
|
@ -177,7 +177,7 @@ void DFloor::Tick ()
|
|||
case floorLowerAndChange:
|
||||
case genFloorChgT:
|
||||
case genFloorChg0:
|
||||
m_Sector->xspecial = m_Sector->xspecial | m_NewSpecial;
|
||||
m_Sector->GetSpecial(&m_NewSpecial);
|
||||
//fall thru
|
||||
case genFloorChg:
|
||||
m_Sector->SetTexture(sector_t::floor, m_Texture);
|
||||
|
|
@ -235,14 +235,14 @@ void DFloor::SetFloorChangeType (sector_t *sec, int change)
|
|||
switch (change & 3)
|
||||
{
|
||||
case 1:
|
||||
m_NewSpecial = 0;
|
||||
m_NewSpecial.Clear();
|
||||
m_Type = DFloor::genFloorChg0;
|
||||
break;
|
||||
case 2:
|
||||
m_Type = DFloor::genFloorChg;
|
||||
break;
|
||||
case 3:
|
||||
m_NewSpecial = sec->xspecial;
|
||||
sec->GetSpecial(&m_NewSpecial);
|
||||
m_Type = DFloor::genFloorChgT;
|
||||
break;
|
||||
}
|
||||
|
|
@ -440,11 +440,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->xspecial = line->frontsector->xspecial;
|
||||
sec->TransferSpecial(line->frontsector);
|
||||
}
|
||||
else
|
||||
{
|
||||
sec->xspecial = 0;
|
||||
sec->ClearSpecial();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -455,8 +455,7 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
|||
floor->m_Texture = sec->GetTexture(sector_t::floor);
|
||||
// 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->xspecial;
|
||||
sec->GetSpecial(&floor->m_NewSpecial);
|
||||
|
||||
//jff 5/23/98 use model subroutine to unify fixes and handling
|
||||
sector_t *modelsec;
|
||||
|
|
@ -464,7 +463,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->xspecial;
|
||||
modelsec->GetSpecial(&floor->m_NewSpecial);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -794,7 +793,7 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed)
|
|||
floor->m_Sector = s2;
|
||||
floor->m_Speed = slimespeed;
|
||||
floor->m_Texture = s3->GetTexture(sector_t::floor);
|
||||
floor->m_NewSpecial = 0;
|
||||
floor->m_NewSpecial.Clear();
|
||||
height = s3->FindHighestFloorPoint (&spot);
|
||||
floor->m_FloorDestDist = s2->floorplane.PointToDist (spot, height);
|
||||
floor->StartFloorSound ();
|
||||
|
|
@ -1093,7 +1092,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->xspecial = line->frontsector->xspecial;
|
||||
sec->TransferSpecial(line->frontsector);
|
||||
}
|
||||
break;
|
||||
case numChangeOnly:
|
||||
|
|
@ -1101,7 +1100,7 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag)
|
|||
if (secm)
|
||||
{ // if no model, no change
|
||||
sec->SetTexture(sector_t::floor, secm->GetTexture(sector_t::floor));
|
||||
sec->xspecial = secm->xspecial;
|
||||
sec->TransferSpecial(secm);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue