fix cleanup order to ensure environment is re-rendered

This commit is contained in:
Stephen Birarda 2015-04-01 17:50:12 -07:00
parent 862f26a095
commit 69f0c50a3c

View file

@ -232,6 +232,8 @@ function playRandomMuzak() {
} }
function cleanupLobby() { function cleanupLobby() {
toggleEnvironmentRendering(true);
// for each of the 21 placeholder textures, set them back to default so the cached model doesn't have changed textures // for each of the 21 placeholder textures, set them back to default so the cached model doesn't have changed textures
var panelTexturesReset = {}; var panelTexturesReset = {};
panelTexturesReset["textures"] = {}; panelTexturesReset["textures"] = {};
@ -249,13 +251,18 @@ function cleanupLobby() {
panelWall = false; panelWall = false;
orbShell = false; orbShell = false;
currentDrone.stop(); if (currentDrone) {
currentMuzakInjector.stop(); currentDrone.stop();
currentDrone = null
}
currentMuzakInjector = null; if (currentMuzakInjector) {
currentMuzakInjector.stop();
currentMuzakInjector = null;
}
places = {}; places = {};
toggleEnvironmentRendering(true);
} }
function actionStartEvent(event) { function actionStartEvent(event) {