Fix for Issue #54 for PhysX client crash on exit

This commit is contained in:
David Wyand 2012-10-03 15:59:34 -04:00
parent 9afd794913
commit f6627f98af
4 changed files with 28 additions and 0 deletions

View file

@ -121,6 +121,13 @@ function disconnectedCleanup()
// Back to the launch screen
if (isObject( 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.
physicsDestroyWorld( "client" );

View file

@ -121,6 +121,13 @@ function disconnectedCleanup()
// Back to the launch screen
if (isObject( 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.
physicsDestroyWorld( "client" );

View file

@ -222,6 +222,13 @@ function disconnectedCleanup()
Canvas.setContent( MainMenuGui );
else if (isObject( 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.
physicsDestroyWorld( "client" );

View file

@ -222,6 +222,13 @@ function disconnectedCleanup()
Canvas.setContent( MainMenuGui );
else if (isObject( 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.
physicsDestroyWorld( "client" );