Staggered UHC game teleports to help reduce lag.

This commit is contained in:
Chiss 2014-10-12 18:26:18 +11:00
parent 28285ab999
commit 603c0cb66e
3 changed files with 6 additions and 2 deletions

View File

@ -200,6 +200,8 @@ public abstract class Game implements Listener
public boolean JoinInProgress = false;
public int TickPerTeleport = 1;
public boolean StrictAntiHack = false;
//Addons

View File

@ -154,6 +154,8 @@ public class UHC extends TeamGame
this.CompassGiveItem = false;
this.WorldBoundaryKill = false;
this.TickPerTeleport = 3;
WorldTimeSet = -1;

View File

@ -550,7 +550,7 @@ public class GameManager implements Listener
PlayerPrepareTeleportEvent playerStateEvent = new PlayerPrepareTeleportEvent(game, player);
UtilServer.getServer().getPluginManager().callEvent(playerStateEvent);
}
}, i);
}, i * game.TickPerTeleport);
}
//Announce Game after every player is TP'd in
@ -565,7 +565,7 @@ public class GameManager implements Listener
GamePrepareCountdownCommence event = new GamePrepareCountdownCommence(game);
UtilServer.getServer().getPluginManager().callEvent(event);
}
}, players.size());
}, players.size() * game.TickPerTeleport);
//Spectators Move
for (Player player : UtilServer.getPlayers())