diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index 2f408126..f206d318 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -107,7 +107,8 @@ export class Room { this._mapUrl = data.mapUrl; this._textures = data.textures; this._group = data.group; - this._authenticationMandatory = data.authenticationMandatory || DISABLE_ANONYMOUS; + this._authenticationMandatory = + data.authenticationMandatory != null ? data.authenticationMandatory : DISABLE_ANONYMOUS; this._iframeAuthentication = data.iframeAuthentication || OPID_LOGIN_SCREEN_PROVIDER; this._contactPage = data.contactPage || CONTACT_URL; return new MapDetail(data.mapUrl, data.textures); diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 7df18fcd..1211a52d 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -128,6 +128,10 @@ export abstract class Character extends Container { } public addTextures(textures: string[], frame?: string | number): void { + if (textures.length < 1) { + throw new TextureError("no texture given"); + } + for (const texture of textures) { if (this.scene && !this.scene.textures.exists(texture)) { throw new TextureError("texture not found"); diff --git a/front/src/Phaser/Entity/PlayerTexturesLoadingManager.ts b/front/src/Phaser/Entity/PlayerTexturesLoadingManager.ts index 92954bfb..edaeb5b8 100644 --- a/front/src/Phaser/Entity/PlayerTexturesLoadingManager.ts +++ b/front/src/Phaser/Entity/PlayerTexturesLoadingManager.ts @@ -69,13 +69,11 @@ export const lazyLoadPlayerCharacterTextures = ( } //If the loading fail, we render the default model instead. - return returnPromise - .then((keys) => - keys.map((key) => { - return typeof key !== "string" ? key.name : key; - }) - ) - .catch(() => lazyLoadPlayerCharacterTextures(loadPlugin, ["color_22", "eyes_23"])); + return returnPromise.then((keys) => + keys.map((key) => { + return typeof key !== "string" ? key.name : key; + }) + ); }; export const getRessourceDescriptor = ( diff --git a/front/src/Phaser/Game/GameMapPropertiesListener.ts b/front/src/Phaser/Game/GameMapPropertiesListener.ts index 0261ffb7..dad55768 100644 --- a/front/src/Phaser/Game/GameMapPropertiesListener.ts +++ b/front/src/Phaser/Game/GameMapPropertiesListener.ts @@ -27,7 +27,7 @@ export class GameMapPropertiesListener { constructor(private scene: GameScene, private gameMap: GameMap) {} register() { - this.gameMap.onPropertyChange(GameMapProperties.OPEN_TAB, (newValue, oldvalue, allProps) => { + this.gameMap.onPropertyChange(GameMapProperties.OPEN_TAB, (newValue, oldValue, allProps) => { if (newValue === undefined) { layoutManagerActionStore.removeAction("openTab"); } @@ -192,11 +192,6 @@ export class GameMapPropertiesListener { if (coWebsiteOpen.state === OpenCoWebsiteState.LOADING) { coWebsiteOpen.state = OpenCoWebsiteState.MUST_BE_CLOSE; - return; - } - - if (coWebsiteOpen.state !== OpenCoWebsiteState.OPENED) { - return; } if (coWebsiteOpen.coWebsite !== undefined) {