fix woka-list

This commit is contained in:
_Bastler
2022-03-13 15:49:21 +01:00
parent 366231df98
commit df094d30a2
4 changed files with 21 additions and 27 deletions
+12 -14
View File
@@ -345,20 +345,6 @@ class ConnectionManager {
gameManager.setPlayerName(username);
}
const layers: string[] = [];
if (textures) {
let i = 0;
for (const layerItem of textures) {
if (layerItem !== undefined) {
layers.push(layerItem.id);
}
i++;
}
if (layers.length > 0) {
gameManager.setCharacterLayers(layers);
}
}
if (locale) {
try {
if (locales.indexOf(locale) == -1) {
@@ -376,6 +362,18 @@ class ConnectionManager {
}
}
if (textures) {
const layers: string[] = [];
for (const texture of textures) {
if (texture !== undefined) {
layers.push(texture.id);
}
}
if (layers.length > 0) {
gameManager.setCharacterLayers(layers);
}
}
//user connected, set connected store for menu at true
userIsConnected.set(true);
}
+1 -1
View File
@@ -46,7 +46,7 @@ export class CustomizeScene extends AbstractCharacterScene {
// FIXME: window.location.href is wrong. We need the URL of the main room (so we need to apply any redirect before!)
this.load.json(
wokaMetadataKey,
`${PUSHER_URL}/woka/list/` + encodeURIComponent(window.location.href),
`${PUSHER_URL}/woka/list?roomUrl=` + encodeURIComponent(window.location.href),
undefined,
{
responseType: "text",
@@ -50,7 +50,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
// FIXME: window.location.href is wrong. We need the URL of the main room (so we need to apply any redirect before!)
this.load.json(
wokaMetadataKey,
`${PUSHER_URL}/woka/list/` + encodeURIComponent(window.location.href),
`${PUSHER_URL}/woka/list?roomUrl=` + encodeURIComponent(window.location.href),
undefined,
{
responseType: "text",