Simple sanity check when changing scenes

This commit is contained in:
Melledy 2022-04-18 09:59:00 -07:00
parent cf69b61b98
commit 1322f909f3

View File

@ -183,6 +183,10 @@ public class World implements Iterable<GenshinPlayer> {
} }
public void transferPlayerToScene(GenshinPlayer player, int sceneId, Position pos) { public void transferPlayerToScene(GenshinPlayer player, int sceneId, Position pos) {
if (player.getScene().getId() == sceneId) {
return;
}
if (player.getScene() != null) { if (player.getScene() != null) {
player.getScene().removePlayer(player); player.getScene().removePlayer(player);
} }