From 9b1210cf296d6d2fd59db1e2288885d4f5cdd137 Mon Sep 17 00:00:00 2001 From: "Matei Budiu (Aehmttw)" Date: Sat, 1 Oct 2022 00:40:18 -0400 Subject: [PATCH] Tanks v1.4.1 - fixed critical bugs --- src/main/java/tanks/Game.java | 2 +- src/main/java/tanks/gui/screen/ScreenChangelog.java | 11 +++-------- src/main/java/tanks/network/ServerHandler.java | 8 ++++---- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/main/java/tanks/Game.java b/src/main/java/tanks/Game.java index 8dfae33e..3cdcfae4 100644 --- a/src/main/java/tanks/Game.java +++ b/src/main/java/tanks/Game.java @@ -95,7 +95,7 @@ public enum Framework {lwjgl, libgdx} public static double[][] tilesDepth = new double[28][18]; //Remember to change the version in android's build.gradle and ios's robovm.properties - public static final String version = "Tanks v1.4.1b"; + public static final String version = "Tanks v1.4.1"; public static final int network_protocol = 46; public static boolean debug = false; public static boolean traceAllRays = false; diff --git a/src/main/java/tanks/gui/screen/ScreenChangelog.java b/src/main/java/tanks/gui/screen/ScreenChangelog.java index d7fdc6d5..43ca28f3 100644 --- a/src/main/java/tanks/gui/screen/ScreenChangelog.java +++ b/src/main/java/tanks/gui/screen/ScreenChangelog.java @@ -409,16 +409,11 @@ public static void setupLogs() "Bug fixes and other minor improvements\n" }); - new Changelog("v1.4.1a", new String[] + new Changelog("v1.4.1", new String[] { - "*What's new in Tanks v1.4.1a:\n\n" + - "Fixed a memory leak with custom tank music\n" - }); - - new Changelog("v1.4.1b", new String[] - { - "*What's new in Tanks v1.4.1b:\n\n" + + "*What's new in Tanks v1.4.1:\n\n" + "Added bandwidth usage to info bar\n" + + "Fixed a memory leak with custom tank music\n" + "Fixed a bug with spawning tanks in multiplayer\n" }); } diff --git a/src/main/java/tanks/network/ServerHandler.java b/src/main/java/tanks/network/ServerHandler.java index 716792c6..216c8cb9 100644 --- a/src/main/java/tanks/network/ServerHandler.java +++ b/src/main/java/tanks/network/ServerHandler.java @@ -84,7 +84,7 @@ public void channelInactive(ChannelHandlerContext ctx) } } - System.out.println(eventFrequencies); + //System.out.println(eventFrequencies); } @Override @@ -147,12 +147,12 @@ public synchronized void sendEvent(INetworkEvent e) this.sendEvent(e, true); } - public HashMap eventFrequencies = new HashMap<>(); + //public HashMap eventFrequencies = new HashMap<>(); public synchronized void sendEvent(INetworkEvent e, boolean flush) { - eventFrequencies.putIfAbsent(e.getClass().getSimpleName(), 0); - eventFrequencies.put(e.getClass().getSimpleName(), eventFrequencies.get(e.getClass().getSimpleName()) + 1); + //eventFrequencies.putIfAbsent(e.getClass().getSimpleName(), 0); + //eventFrequencies.put(e.getClass().getSimpleName(), eventFrequencies.get(e.getClass().getSimpleName()) + 1); if (steamID != null) {