- Fixed: When a skybox viewpoint is destroyed it should clear all

sector references to itself.


SVN r600 (trunk)
This commit is contained in:
Christoph Oelckers 2007-12-17 22:18:52 +00:00
commit 4d6fc97a9a
3 changed files with 21 additions and 0 deletions

View file

@ -72,6 +72,22 @@ void ASkyViewpoint::Serialize (FArchive &arc)
arc << bInSkybox << bAlways << Mate << PlaneAlpha;
}
void ASkyViewpoint::Destroy ()
{
// remove all sector references to ourselves.
for (int i = 0; i <numsectors; i++)
{
if (sectors[i].FloorSkyBox == this)
{
sectors[i].FloorSkyBox = NULL;
}
if (sectors[i].CeilingSkyBox == this)
{
sectors[i].CeilingSkyBox = NULL;
}
}
}
//---------------------------------------------------------------------------
// arg0 = tid of matching SkyViewpoint