mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 06:02:13 +00:00
Fixed crash when switching maps and editLights is still running. close #960
This commit is contained in:
parent
e0da5a7890
commit
4f778fcc9d
2 changed files with 17 additions and 0 deletions
|
@ -1715,6 +1715,18 @@ void idGameLocal::MapShutdown()
|
|||
gameRenderWorld->DebugClearPolygons( 0 );
|
||||
}
|
||||
|
||||
// RB: kill ingame editors to prevent crashes during shutdown
|
||||
if( com_editors != 0 )
|
||||
{
|
||||
com_editors = 0;
|
||||
g_editEntityMode.SetInteger( 0 );
|
||||
|
||||
// turn off light debug drawing in the render backend
|
||||
r_singleLight.SetInteger( -1 );
|
||||
r_showLights.SetInteger( 0 );
|
||||
}
|
||||
// RB end
|
||||
|
||||
// clear out camera if we're in a cinematic
|
||||
if( inCinematic )
|
||||
{
|
||||
|
|
|
@ -74,6 +74,11 @@ bool ReleaseMouseForTools()
|
|||
|
||||
void DrawToolWindows()
|
||||
{
|
||||
if( !AreEditorsActive() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( LightEditor::Instance().IsShown() )
|
||||
{
|
||||
LightEditor::Instance().Draw();
|
||||
|
|
Loading…
Reference in a new issue