This commit is contained in:
_Bastler 2021-09-20 09:53:25 +02:00
parent 1e43229956
commit 54346896b9
2 changed files with 7 additions and 0 deletions

View File

@ -178,6 +178,7 @@ class ConnectionManager {
} catch (e) {
console.error(e);
localUserStore.setLastRoomUrl(null);
this._currentRoom = null;
}
if (this._currentRoom != undefined && this._currentRoom.textures != undefined && this._currentRoom.textures.length > 0) {
//check if texture was changed

View File

@ -456,6 +456,12 @@ export class GameScene extends DirtyScene {
//initialise map
this.Map = this.add.tilemap(this.MapUrlFile);
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.Terrains.push(
this.Map.addTilesetImage(