Attempt to somewhat fix the lag whenever the game starts

This commit is contained in:
Sam 2017-06-30 13:56:20 +01:00
parent 67d792e9d7
commit 811463e586
4 changed files with 7 additions and 8 deletions

View File

@ -119,10 +119,10 @@ public abstract class BattleRoyale extends Game
// TODO REMOVE THIS
TeleportsDisqualify = false;
TickPerTeleport = 20;
PrepareTime = PREPARE_TIME;
PrepareFreeze = false;
SpawnTeleport = false;
Damage = false;
DamageTeamSelf = true;
DeathDropItems = true;
@ -172,7 +172,7 @@ public abstract class BattleRoyale extends Game
chestSpawns.addAll(WorldData.GetDataLocs("BLUE"));
new ChestLootModule()
.destoryAfterOpened(20)
.destroyAfterOpened(20)
.spawnNearbyDataPoints()
.registerChestType("Standard", chestSpawns,
@ -422,7 +422,7 @@ public abstract class BattleRoyale extends Game
index.getAndIncrement();
}
}, 200, 2);
}, 40, 2);
}
private Location getPlayerSpawn(int initialXZ)

View File

@ -103,7 +103,8 @@ public class BattleRoyaleSolo extends BattleRoyale
if (_supplyDrop != null)
{
_supplyDropLocation = UtilWorld.locToStrClean(_supplyDrop.getDropLocation());
Location location = _supplyDrop.getDropLocation();
_supplyDropLocation = "(" + location.getBlockX() + ", " + location.getBlockZ() + ")";
_supplyDropState = _supplyDrop.getScoreboardString();
}
else

View File

@ -59,12 +59,11 @@ class BattleRoyaleSupplyDrop implements Listener
private boolean _dropped;
private boolean _opened;
private boolean _landed;
private long _openedAt;
BattleRoyaleSupplyDrop(BattleRoyale host, Location dropLocation)
{
_host = host;
_dropLocation = dropLocation;
_dropLocation = dropLocation.clone();
_start = System.currentTimeMillis();
_beaconBlocks = new HashSet<>();
_chute = new ArrayList<>();
@ -157,7 +156,6 @@ class BattleRoyaleSupplyDrop implements Listener
if (UtilMath.offsetSquared(block.getLocation(), _dropLocation) < 4)
{
_opened = true;
_openedAt = System.currentTimeMillis();
cleanup();
}
}

View File

@ -64,7 +64,7 @@ public class ChestLootModule extends Module
return this;
}
public ChestLootModule destoryAfterOpened(int seconds)
public ChestLootModule destroyAfterOpened(int seconds)
{
_destroyAfterOpened = TimeUnit.SECONDS.toMillis(seconds);
return this;