From b7b155589ab1121a4e231b59fae35c5f51a5f18b Mon Sep 17 00:00:00 2001 From: PhilippvK Date: Wed, 25 Mar 2020 11:44:31 +0100 Subject: [PATCH] fix track transistion bug (#2) --- server/src/org/moparforia/server/game/gametypes/GolfGame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/org/moparforia/server/game/gametypes/GolfGame.java b/server/src/org/moparforia/server/game/gametypes/GolfGame.java index 13373b73..e525489d 100644 --- a/server/src/org/moparforia/server/game/gametypes/GolfGame.java +++ b/server/src/org/moparforia/server/game/gametypes/GolfGame.java @@ -204,7 +204,7 @@ protected boolean checkRecord() { } Track track = tracks.get(currentTrack); - if (track.getFirstBestPlayer().equals("") || track.getBestPar() > getLeadingPar()) { // first ever record OR beat previous + if ("".equals(track.getFirstBestPlayer()) || track.getBestPar() > getLeadingPar()) { // first ever record OR beat previous TrackManager.updateStats(track, getLeadingPlayer(), getLeadingPar(), true); return true; } else if (track.getBestPar() == getLeadingPar()) { // matched par, latest @@ -307,4 +307,4 @@ public String getGameString() { waterEvent, collision, trackScoring, trackScoringEnd, getPlayers().size()); } -} \ No newline at end of file +}