Removed hard coded default map
You can apply local maps using the maps vhost as previously. But it's also possible to specify external maps by prepending http or https.
This commit is contained in:
committed by
Thomas Basler
parent
84f85effe5
commit
14b328c733
@@ -1,5 +1,5 @@
|
||||
import Axios from "axios";
|
||||
import {API_URL} from "../Enum/EnvironmentVariable";
|
||||
import {API_URL, START_ROOM_URL} from "../Enum/EnvironmentVariable";
|
||||
import {RoomConnection} from "./RoomConnection";
|
||||
import {OnConnectInterface, PositionInterface, ViewportInterface} from "./ConnexionModels";
|
||||
import {GameConnexionTypes, urlManager} from "../Url/UrlManager";
|
||||
@@ -7,8 +7,6 @@ import {localUserStore} from "./LocalUserStore";
|
||||
import {LocalUser} from "./LocalUser";
|
||||
import {Room} from "./Room";
|
||||
|
||||
const URL_ROOM_STARTED = 'tcm/workadventure/floor0';
|
||||
|
||||
class ConnectionManager {
|
||||
private localUser!:LocalUser;
|
||||
|
||||
@@ -50,7 +48,11 @@ class ConnectionManager {
|
||||
}
|
||||
let roomId: string
|
||||
if (connexionType === GameConnexionTypes.empty) {
|
||||
roomId = urlManager.editUrlForRoom(URL_ROOM_STARTED, null, null);
|
||||
if (START_ROOM_URL.startsWith('http://') || START_ROOM_URL.startsWith('https://')) {
|
||||
roomId = '/_/global/' + START_ROOM_URL.replace('http://', '').replace('https://', '');
|
||||
} else {
|
||||
roomId = urlManager.editUrlForRoom(START_ROOM_URL, null, null);
|
||||
}
|
||||
} else {
|
||||
roomId = window.location.pathname + window.location.hash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user