secure DISABLE_ANONYMOUS
This commit is contained in:
@@ -37,7 +37,7 @@ export class GameManager {
|
||||
|
||||
//If player name was not set show login scene with player name
|
||||
//If Room si not public and Auth was not set, show login scene to authenticate user (OpenID - SSO - Anonymous)
|
||||
if (!this.playerName || !localUserStore.getAuthToken()) {
|
||||
if (!this.playerName || (this.startRoom.authenticationMandatory && !localUserStore.getAuthToken())) {
|
||||
return LoginSceneName;
|
||||
} else if (!this.characterLayers || !this.characterLayers.length) {
|
||||
return SelectCharacterSceneName;
|
||||
|
||||
@@ -303,17 +303,12 @@ export class GameScene extends DirtyScene {
|
||||
//remove loader in progress
|
||||
removeLoader(this);
|
||||
|
||||
if (this.roomUrl == localUserStore.getLastRoomUrl()) {
|
||||
localUserStore.setLastRoomUrl(null);
|
||||
}
|
||||
|
||||
//display an error scene
|
||||
this.scene.start(ErrorSceneName, {
|
||||
title: "Network error",
|
||||
subTitle: "An error occurred while loading resource:",
|
||||
message: this.originalMapUrl ?? file.src,
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.load.scenePlugin("AnimatedTiles", AnimatedTiles, "animatedTiles", "animatedTiles");
|
||||
@@ -460,12 +455,6 @@ 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(
|
||||
|
||||
Reference in New Issue
Block a user