mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 23:52:02 +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
|
December 14, 2007
|
||||||
- Fixed: G_QueueBody() should only change the translation to one of its
|
- Fixed: G_QueueBody() should only change the translation to one of its
|
||||||
private slots if the one currently used is a player range.
|
private slots if the one currently used is a player range.
|
||||||
|
|
|
@ -122,6 +122,7 @@ class ASkyViewpoint : public AActor
|
||||||
public:
|
public:
|
||||||
void Serialize (FArchive &arc);
|
void Serialize (FArchive &arc);
|
||||||
void BeginPlay ();
|
void BeginPlay ();
|
||||||
|
void Destroy ();
|
||||||
bool bInSkybox;
|
bool bInSkybox;
|
||||||
bool bAlways;
|
bool bAlways;
|
||||||
ASkyViewpoint *Mate;
|
ASkyViewpoint *Mate;
|
||||||
|
|
|
@ -72,6 +72,22 @@ void ASkyViewpoint::Serialize (FArchive &arc)
|
||||||
arc << bInSkybox << bAlways << Mate << PlaneAlpha;
|
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
|
// arg0 = tid of matching SkyViewpoint
|
||||||
|
|
Loading…
Reference in a new issue