From 85da25e70d0e1f059bb72de497b90f736c7bf4b7 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Mon, 11 Apr 2022 23:49:29 -0300 Subject: [PATCH] Fix Room change during teleport --- .../messages/incoming/rooms/RequestRoomLoadEvent.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/RequestRoomLoadEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/RequestRoomLoadEvent.java index 9bdaf28a..93c904be 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/RequestRoomLoadEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/RequestRoomLoadEvent.java @@ -12,9 +12,6 @@ public class RequestRoomLoadEvent extends MessageHandler { String password = this.packet.readString(); if (this.client.getHabbo().getHabboInfo().getLoadingRoom() == 0 && this.client.getHabbo().getHabboStats().roomEnterTimestamp + 1000 < System.currentTimeMillis()) { - if (this.client.getHabbo().getRoomUnit() != null && this.client.getHabbo().getRoomUnit().isTeleporting) { - return; - } Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); if (room != null) { @@ -24,6 +21,11 @@ public class RequestRoomLoadEvent extends MessageHandler { this.client.getHabbo().getHabboInfo().setCurrentRoom(null); } + + if (this.client.getHabbo().getRoomUnit() != null && this.client.getHabbo().getRoomUnit().isTeleporting) { + this.client.getHabbo().getRoomUnit().isTeleporting = false; + } + Emulator.getGameEnvironment().getRoomManager().enterRoom(this.client.getHabbo(), roomId, password); } }