Prepar release 1.1.0

Automatically redirect on floor0 of TCM map
This commit is contained in:
Gregoire Parant 2021-01-18 22:52:25 +01:00
parent d891a288b5
commit c95419f0e7
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import {localUserStore} from "./LocalUserStore";
import {LocalUser} from "./LocalUser";
import {Room} from "./Room";
const URL_ROOM_STARTED = '/Floor0/floor0.json';
const URL_ROOM_STARTED = 'tcm/workadventure/floor0';
class ConnectionManager {
private localUser!:LocalUser;
@ -50,8 +50,7 @@ class ConnectionManager {
}
let roomId: string
if (connexionType === GameConnexionTypes.empty) {
const defaultMapUrl = window.location.host.replace('play.', 'maps.') + URL_ROOM_STARTED;
roomId = urlManager.editUrlForRoom(defaultMapUrl, null, null);
roomId = urlManager.editUrlForRoom(URL_ROOM_STARTED, null, null);
} else {
roomId = window.location.pathname + window.location.hash;
}

View File

@ -40,7 +40,7 @@ class UrlManager {
if (organizationSlug) {
newUrl = '/@/'+organizationSlug+'/'+worldSlug+'/'+roomSlug;
} else {
newUrl = '/_/global/'+roomSlug;
newUrl = '/@/'+roomSlug;
}
history.pushState({}, 'WorkAdventure', newUrl);
return newUrl;