Fixing merge
This commit is contained in:
parent
5c7ea7b258
commit
3d76f76d3e
3 changed files with 5 additions and 21 deletions
|
@ -44,15 +44,6 @@ export class PusherRoom {
|
|||
this.tags = [];
|
||||
this.policyType = GameRoomPolicyTypes.ANONYMOUS_POLICY;
|
||||
|
||||
if (this.public) {
|
||||
this.roomSlug = extractRoomSlugPublicRoomId(this.roomId);
|
||||
} else {
|
||||
const { organizationSlug, worldSlug, roomSlug } = extractDataFromPrivateRoomId(this.roomId);
|
||||
this.roomSlug = roomSlug;
|
||||
this.organizationSlug = organizationSlug;
|
||||
this.worldSlug = worldSlug;
|
||||
}
|
||||
|
||||
// A zone is 10 sprites wide.
|
||||
this.positionNotifier = new PositionDispatcher(this.roomUrl, 320, 320, this.socketListener);
|
||||
}
|
||||
|
@ -91,10 +82,10 @@ export class PusherRoom {
|
|||
* Creates a connection to the back server to track global messages relative to this room (like variable changes).
|
||||
*/
|
||||
public async init(): Promise<void> {
|
||||
debug("Opening connection to room %s on back server", this.roomId);
|
||||
const apiClient = await apiClientRepository.getClient(this.roomId);
|
||||
debug("Opening connection to room %s on back server", this.roomUrl);
|
||||
const apiClient = await apiClientRepository.getClient(this.roomUrl);
|
||||
const roomMessage = new RoomMessage();
|
||||
roomMessage.setRoomid(this.roomId);
|
||||
roomMessage.setRoomid(this.roomUrl);
|
||||
this.backConnection = apiClient.listenRoom(roomMessage);
|
||||
this.backConnection.on("data", (batch: BatchToPusherRoomMessage) => {
|
||||
for (const message of batch.getPayloadList()) {
|
||||
|
@ -141,7 +132,7 @@ export class PusherRoom {
|
|||
}
|
||||
|
||||
public close(): void {
|
||||
debug("Closing connection to room %s on back server", this.roomId);
|
||||
debug("Closing connection to room %s on back server", this.roomUrl);
|
||||
this.isClosing = true;
|
||||
this.backConnection.cancel();
|
||||
}
|
||||
|
|
|
@ -380,7 +380,7 @@ export class SocketManager implements ZoneEventListener {
|
|||
if (ADMIN_API_URL) {
|
||||
await this.updateRoomWithAdminData(room);
|
||||
}
|
||||
await world.init();
|
||||
await room.init();
|
||||
this.rooms.set(roomUrl, room);
|
||||
}
|
||||
return room;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue