- Put more floor/ceiling properties in sector_t into a substructure and
added wrapper functions. SVN r1174 (trunk)
This commit is contained in:
parent
fcdef6a0de
commit
bc5d0c882b
29 changed files with 271 additions and 246 deletions
|
|
@ -1898,18 +1898,8 @@ void DLevelScript::ChangeFlat (int tag, int name, bool floorOrCeiling)
|
|||
|
||||
while ((secnum = P_FindSectorFromTag (tag, secnum)) >= 0)
|
||||
{
|
||||
if (floorOrCeiling == false)
|
||||
{
|
||||
if (sectors[secnum].floorpic != flat)
|
||||
{
|
||||
sectors[secnum].floorpic = flat;
|
||||
sectors[secnum].AdjustFloorClip ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sectors[secnum].ceilingpic = flat;
|
||||
}
|
||||
int pos = floorOrCeiling? sector_t::ceiling : sector_t::floor;
|
||||
sectors[secnum].SetTexture(pos, flat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2000,8 +1990,10 @@ void DLevelScript::ReplaceTextures (int fromnamei, int tonamei, int flags)
|
|||
{
|
||||
sector_t *sec = §ors[i];
|
||||
|
||||
if (!(flags & NOT_FLOOR) && sec->floorpic == picnum1) sec->floorpic = picnum2;
|
||||
if (!(flags & NOT_CEILING) && sec->ceilingpic == picnum1) sec->ceilingpic = picnum2;
|
||||
if (!(flags & NOT_FLOOR) && sec->GetTexture(sector_t::floor) == picnum1)
|
||||
sec->SetTexture(sector_t::floor, picnum2);
|
||||
if (!(flags & NOT_CEILING) && sec->GetTexture(sector_t::ceiling) == picnum1)
|
||||
sec->SetTexture(sector_t::ceiling, picnum2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5321,7 +5313,7 @@ int DLevelScript::RunScript ()
|
|||
if (actor != NULL)
|
||||
{
|
||||
FTexture *tex = TexMan.FindTexture(FBehavior::StaticLookupString(STACK(1)));
|
||||
STACK(2) = (tex == TexMan[actor->Sector->ceilingpic]);
|
||||
STACK(2) = (tex == TexMan[actor->Sector->GetTexture(sector_t::ceiling)]);
|
||||
}
|
||||
else STACK(2)=0;
|
||||
sp--;
|
||||
|
|
@ -5334,7 +5326,7 @@ int DLevelScript::RunScript ()
|
|||
if (actor != NULL)
|
||||
{
|
||||
FTexture *tex = TexMan.FindTexture(FBehavior::StaticLookupString(STACK(1)));
|
||||
STACK(2) = (tex == TexMan[actor->Sector->floorpic]);
|
||||
STACK(2) = (tex == TexMan[actor->Sector->GetTexture(sector_t::floor)]);
|
||||
}
|
||||
else STACK(2)=0;
|
||||
sp--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue