mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- Fixed: When a skybox viewpoint is destroyed it should clear all
sector references to itself. SVN r600 (trunk)
This commit is contained in:
parent
dd460fed2a
commit
4d6fc97a9a
3 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
December 17, 2007 (Changes by Graf Zahl)
|
||||
- Fixed: When a skybox viewpoint is destroyed it should clear all
|
||||
sector references to itself.
|
||||
|
||||
December 14, 2007
|
||||
- Fixed: G_QueueBody() should only change the translation to one of its
|
||||
private slots if the one currently used is a player range.
|
||||
|
|
|
@ -122,6 +122,7 @@ class ASkyViewpoint : public AActor
|
|||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
void BeginPlay ();
|
||||
void Destroy ();
|
||||
bool bInSkybox;
|
||||
bool bAlways;
|
||||
ASkyViewpoint *Mate;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue