Browse Source

Closes #1865; make unzoning correctly destroy objects

merge-requests/574/head
kckckc 2 years ago
parent
commit
0e118a5e92
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      src/client/js/rendering/renderer.js
  2. +1
    -1
      src/client/ui/templates/mainMenu/mainMenu.js

+ 5
- 0
src/client/js/rendering/renderer.js View File

@@ -82,6 +82,7 @@ define([
PIXI.settings.RESOLUTION = 1;

events.on('onGetMap', this.onGetMap.bind(this));
events.on('onShowCharacterSelect', this.onShowCharacterSelect.bind(this));
events.on('onToggleFullscreen', this.toggleScreen.bind(this));
events.on('onMoveSpeedChange', this.adaptCameraMoveSpeed.bind(this));

@@ -274,6 +275,10 @@ define([
return tile;
},

onShowCharacterSelect: function () {
this.zoneId = null;
},

onGetMap: function (msg) {
this.titleScreen = false;
physics.init(msg.collisionMap);


+ 1
- 1
src/client/ui/templates/mainMenu/mainMenu.js View File

@@ -59,7 +59,7 @@ define([

onCharSelect: function () {
renderer.clean();
objects.onRezone();
objects.onRezone(null);
renderer.buildTitleScreen();
sound.unload();



Loading…
Cancel
Save