Staggered UHC game teleports to help reduce lag.
This commit is contained in:
parent
28285ab999
commit
603c0cb66e
@ -200,6 +200,8 @@ public abstract class Game implements Listener
|
||||
|
||||
public boolean JoinInProgress = false;
|
||||
|
||||
public int TickPerTeleport = 1;
|
||||
|
||||
public boolean StrictAntiHack = false;
|
||||
|
||||
//Addons
|
||||
|
@ -154,6 +154,8 @@ public class UHC extends TeamGame
|
||||
this.CompassGiveItem = false;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
|
||||
this.TickPerTeleport = 3;
|
||||
|
||||
WorldTimeSet = -1;
|
||||
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user