From 811463e5868f80c51ba37cfc435339bb27caa178 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 30 Jun 2017 13:56:20 +0100 Subject: [PATCH] Attempt to somewhat fix the lag whenever the game starts --- .../game/arcade/game/games/battleroyale/BattleRoyale.java | 6 +++--- .../arcade/game/games/battleroyale/BattleRoyaleSolo.java | 3 ++- .../game/games/battleroyale/BattleRoyaleSupplyDrop.java | 4 +--- .../game/arcade/game/modules/chest/ChestLootModule.java | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyale.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyale.java index be32bb923..d66e49e34 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyale.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyale.java @@ -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) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSolo.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSolo.java index 678cae858..945a3a98b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSolo.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSolo.java @@ -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 diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSupplyDrop.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSupplyDrop.java index 966ea593c..edd9f332c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSupplyDrop.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/battleroyale/BattleRoyaleSupplyDrop.java @@ -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(); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java index 030a2fcbc..05c309d65 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/chest/ChestLootModule.java @@ -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;