mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 07:17:57 +03:00
Fix maps with multiple sky_cameras not using the correct sky_camera after loading a save
This commit is contained in:
parent
471a840ed9
commit
73988dcc7c
@ -211,6 +211,11 @@ void CSkyCamera::Activate( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
if (HasSpawnFlags( SF_SKY_MASTER ))
|
||||||
|
g_hActiveSkybox = this;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
@ -368,9 +373,11 @@ void CSkyCamera::InputActivateSkybox( inputdata_t &inputdata )
|
|||||||
// Deactivate that skybox
|
// Deactivate that skybox
|
||||||
pActiveSky->SetThink( NULL );
|
pActiveSky->SetThink( NULL );
|
||||||
pActiveSky->SetNextThink( TICK_NEVER_THINK );
|
pActiveSky->SetNextThink( TICK_NEVER_THINK );
|
||||||
|
pActiveSky->RemoveSpawnFlags( SF_SKY_MASTER );
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hActiveSkybox = this;
|
g_hActiveSkybox = this;
|
||||||
|
AddSpawnFlags( SF_SKY_MASTER );
|
||||||
|
|
||||||
if (HasSpawnFlags( SF_SKY_START_UPDATING ))
|
if (HasSpawnFlags( SF_SKY_START_UPDATING ))
|
||||||
InputStartUpdating( inputdata );
|
InputStartUpdating( inputdata );
|
||||||
@ -384,6 +391,7 @@ void CSkyCamera::InputDeactivateSkybox( inputdata_t &inputdata )
|
|||||||
if (GetCurrentSkyCamera() == this)
|
if (GetCurrentSkyCamera() == this)
|
||||||
{
|
{
|
||||||
g_hActiveSkybox = NULL;
|
g_hActiveSkybox = NULL;
|
||||||
|
RemoveSpawnFlags( SF_SKY_MASTER );
|
||||||
|
|
||||||
// ClientData doesn't catch this immediately
|
// ClientData doesn't catch this immediately
|
||||||
CBasePlayer *pPlayer = NULL;
|
CBasePlayer *pPlayer = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user