Fix freeze bug at a new floor

This commit is contained in:
Daniel Saukel 2015-12-28 01:37:46 +01:00
parent 0b0e676733
commit 4c7b97356a

View File

@ -305,10 +305,15 @@ public class DPlayer {
} }
dGroup.removeUnplayedFloor(dGroup.getMapName()); dGroup.removeUnplayedFloor(dGroup.getMapName());
dGroup.setMapName(newFloor); dGroup.setMapName(newFloor);
dGroup.setGameWorld(GameWorld.load(newFloor)); GameWorld gameWorld = GameWorld.load(newFloor);
dGroup.setGameWorld(gameWorld);
for (Player player : dGroup.getPlayers()) { for (Player player : dGroup.getPlayers()) {
DPlayer dPlayer = get(player); DPlayer dPlayer = get(player);
dPlayer.checkpoint = dGroup.getGameWorld().getLocStart(); dPlayer.setWorld(gameWorld.getWorld());
dPlayer.setCheckpoint(dGroup.getGameWorld().getLocStart());
if (dPlayer.getWolf() != null) {
dPlayer.getWolf().teleport(dPlayer.getCheckpoint());
}
} }
dGroup.startGame(); dGroup.startGame();
} }