From fbd9b17ba01039c700c76400abf89cd42031e28e Mon Sep 17 00:00:00 2001 From: xXVevzZXx Date: Sat, 25 Jun 2016 19:33:56 +0200 Subject: [PATCH] fix playeringametime being 0 --- .../src/nautilus/game/arcade/game/games/uhc/UHC.java | 6 +++++- .../nautilus/game/arcade/stats/ExperienceStatTracker.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java index d46f2f7f6..0999ecd4a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java @@ -1202,7 +1202,11 @@ public class UHC extends TeamGame { for (Player player : teamsAlive.get(0).GetPlayers(false)) { - int gems = Math.round((System.currentTimeMillis() - getPlayerIngameTime(player))/1000); + long ingameTime = getPlayerIngameTime(player); + if (ingameTime == 0) + ingameTime = GetStateTime(); + + int gems = Math.round((System.currentTimeMillis() - ingameTime)/1000); AddGems(player, gems, "Winning Team", false, false); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java index 90ae84bce..1e4316316 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/ExperienceStatTracker.java @@ -72,7 +72,7 @@ public class ExperienceStatTracker extends StatTracker //Game Time = 1 Exp per 3 Seconds long time = System.currentTimeMillis(); long playerJoin = getGame().getPlayerIngameTime(player); - + if (playerJoin == 0) playerJoin = _startTime;