Add more checking on woka details
This commit is contained in:
@@ -220,6 +220,7 @@ export class RoomConnection implements RoomConnection {
|
|||||||
|
|
||||||
this.socket.onmessage = (messageEvent) => {
|
this.socket.onmessage = (messageEvent) => {
|
||||||
const arrayBuffer: ArrayBuffer = messageEvent.data;
|
const arrayBuffer: ArrayBuffer = messageEvent.data;
|
||||||
|
const initCharacterLayers = characterLayers;
|
||||||
|
|
||||||
const serverToClientMessage = ServerToClientMessageTsProto.decode(new Uint8Array(arrayBuffer));
|
const serverToClientMessage = ServerToClientMessageTsProto.decode(new Uint8Array(arrayBuffer));
|
||||||
//const message = ServerToClientMessage.deserializeBinary(new Uint8Array(arrayBuffer));
|
//const message = ServerToClientMessage.deserializeBinary(new Uint8Array(arrayBuffer));
|
||||||
@@ -342,12 +343,12 @@ export class RoomConnection implements RoomConnection {
|
|||||||
this._userRoomToken = roomJoinedMessage.userRoomToken;
|
this._userRoomToken = roomJoinedMessage.userRoomToken;
|
||||||
|
|
||||||
// If one of the URLs sent to us does not exist, let's go to the Woka selection screen.
|
// If one of the URLs sent to us does not exist, let's go to the Woka selection screen.
|
||||||
for (const characterLayer of roomJoinedMessage.characterLayer) {
|
if (
|
||||||
if (!characterLayer.url) {
|
roomJoinedMessage.characterLayer.length !== initCharacterLayers.length ||
|
||||||
this.goToSelectYourWokaScene();
|
roomJoinedMessage.characterLayer.find((layer) => !layer.url)
|
||||||
this.closed = true;
|
) {
|
||||||
break;
|
this.goToSelectYourWokaScene();
|
||||||
}
|
this.closed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.closed) {
|
if (this.closed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user