fix
This commit is contained in:
@@ -178,6 +178,7 @@ class ConnectionManager {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
localUserStore.setLastRoomUrl(null);
|
localUserStore.setLastRoomUrl(null);
|
||||||
|
this._currentRoom = null;
|
||||||
}
|
}
|
||||||
if (this._currentRoom != undefined && this._currentRoom.textures != undefined && this._currentRoom.textures.length > 0) {
|
if (this._currentRoom != undefined && this._currentRoom.textures != undefined && this._currentRoom.textures.length > 0) {
|
||||||
//check if texture was changed
|
//check if texture was changed
|
||||||
|
|||||||
@@ -456,6 +456,12 @@ export class GameScene extends DirtyScene {
|
|||||||
//initialise map
|
//initialise map
|
||||||
this.Map = this.add.tilemap(this.MapUrlFile);
|
this.Map = this.add.tilemap(this.MapUrlFile);
|
||||||
const mapDirUrl = this.MapUrlFile.substr(0, this.MapUrlFile.lastIndexOf("/"));
|
const mapDirUrl = this.MapUrlFile.substr(0, this.MapUrlFile.lastIndexOf("/"));
|
||||||
|
|
||||||
|
if (!this.mapFile) {
|
||||||
|
localUserStore.setLastRoomUrl(null);
|
||||||
|
throw new Error("invalid map");
|
||||||
|
}
|
||||||
|
|
||||||
this.mapFile.tilesets.forEach((tileset: ITiledTileSet) => {
|
this.mapFile.tilesets.forEach((tileset: ITiledTileSet) => {
|
||||||
this.Terrains.push(
|
this.Terrains.push(
|
||||||
this.Map.addTilesetImage(
|
this.Map.addTilesetImage(
|
||||||
|
|||||||
Reference in New Issue
Block a user