mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #55 from DavidWyand-GG/issue54-PhysXCrash
Fix for Issue #54 for PhysX client crash on exit
This commit is contained in:
commit
a59a6ef8b1
4 changed files with 28 additions and 0 deletions
|
|
@ -122,6 +122,13 @@ function disconnectedCleanup()
|
||||||
if (isObject( MainMenuGui ))
|
if (isObject( MainMenuGui ))
|
||||||
Canvas.setContent( MainMenuGui );
|
Canvas.setContent( MainMenuGui );
|
||||||
|
|
||||||
|
// Before we destroy the client physics world
|
||||||
|
// make sure all ServerConnection objects are deleted.
|
||||||
|
if(isObject(ServerConnection))
|
||||||
|
{
|
||||||
|
ServerConnection.deleteAllObjects();
|
||||||
|
}
|
||||||
|
|
||||||
// We can now delete the client physics simulation.
|
// We can now delete the client physics simulation.
|
||||||
physicsDestroyWorld( "client" );
|
physicsDestroyWorld( "client" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,13 @@ function disconnectedCleanup()
|
||||||
if (isObject( MainMenuGui ))
|
if (isObject( MainMenuGui ))
|
||||||
Canvas.setContent( MainMenuGui );
|
Canvas.setContent( MainMenuGui );
|
||||||
|
|
||||||
|
// Before we destroy the client physics world
|
||||||
|
// make sure all ServerConnection objects are deleted.
|
||||||
|
if(isObject(ServerConnection))
|
||||||
|
{
|
||||||
|
ServerConnection.deleteAllObjects();
|
||||||
|
}
|
||||||
|
|
||||||
// We can now delete the client physics simulation.
|
// We can now delete the client physics simulation.
|
||||||
physicsDestroyWorld( "client" );
|
physicsDestroyWorld( "client" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,13 @@ function disconnectedCleanup()
|
||||||
else if (isObject( UnifiedMainMenuGui ))
|
else if (isObject( UnifiedMainMenuGui ))
|
||||||
Canvas.setContent( UnifiedMainMenuGui );
|
Canvas.setContent( UnifiedMainMenuGui );
|
||||||
|
|
||||||
|
// Before we destroy the client physics world
|
||||||
|
// make sure all ServerConnection objects are deleted.
|
||||||
|
if(isObject(ServerConnection))
|
||||||
|
{
|
||||||
|
ServerConnection.deleteAllObjects();
|
||||||
|
}
|
||||||
|
|
||||||
// We can now delete the client physics simulation.
|
// We can now delete the client physics simulation.
|
||||||
physicsDestroyWorld( "client" );
|
physicsDestroyWorld( "client" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,13 @@ function disconnectedCleanup()
|
||||||
else if (isObject( UnifiedMainMenuGui ))
|
else if (isObject( UnifiedMainMenuGui ))
|
||||||
Canvas.setContent( UnifiedMainMenuGui );
|
Canvas.setContent( UnifiedMainMenuGui );
|
||||||
|
|
||||||
|
// Before we destroy the client physics world
|
||||||
|
// make sure all ServerConnection objects are deleted.
|
||||||
|
if(isObject(ServerConnection))
|
||||||
|
{
|
||||||
|
ServerConnection.deleteAllObjects();
|
||||||
|
}
|
||||||
|
|
||||||
// We can now delete the client physics simulation.
|
// We can now delete the client physics simulation.
|
||||||
physicsDestroyWorld( "client" );
|
physicsDestroyWorld( "client" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue