Skip to content

Commit

Permalink
fix: optimize for rejoining
Browse files Browse the repository at this point in the history
  • Loading branch information
KoutaChan committed Mar 24, 2024
1 parent 92899e5 commit 066ac4d
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class DungeonManager {
public static Point[] entranceMapCorners;
public static Point entrancePhysicalNWCorner;

public static int tickAmount = 0;
public static Integer mapId;

long bloodTime = Long.MAX_VALUE;
Expand Down Expand Up @@ -91,9 +90,8 @@ public void onTick(TickEvent.ClientTickEvent event) {
EntityPlayerSP player = mc.thePlayer;

if (!Utils.inCatacombs) return; //From this point forward, everything assumes that Utils.inCatacombs == true
tickAmount++;

if ((gameStage == 0 || gameStage == 1) && tickAmount % 20 == 0) {
if (gameStage == 0 || gameStage == 1) {

if (DungeonRooms.firstLogin) {
DungeonRooms.firstLogin = false;
Expand Down Expand Up @@ -148,15 +146,12 @@ public void onTick(TickEvent.ClientTickEvent event) {
}
oddRun = !oddRun;
}

tickAmount = 0;
}
}

@SubscribeEvent
public void onWorldUnload(WorldEvent.Unload event) {
Utils.inCatacombs = false;
tickAmount = 0;
gameStage = 0;

mapId = null;
Expand Down

0 comments on commit 066ac4d

Please sign in to comment.