Fixed player boat not being highlighted.
#story[1095]
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ public class RaceStatusCommand implements Command {
|
||||
|
||||
|
||||
} catch (BoatNotFoundException e) {
|
||||
Logger.getGlobal().log(Level.WARNING, "RaceStatusCommand.updateBoatStatus: " + this + " could not execute. Boat with sourceID: " + boatStatus.getSourceID() + " not found.", e);
|
||||
//Logger.getGlobal().log(Level.WARNING, "RaceStatusCommand.updateBoatStatus: " + this + " could not execute. Boat with sourceID: " + boatStatus.getSourceID() + " not found.", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,10 @@ public class VisualiserRaceState extends RaceState {
|
||||
|
||||
boat.setCurrentLeg(getLegs().get(0));
|
||||
|
||||
Platform.runLater(() -> existingBoats.add(boat));
|
||||
Platform.runLater(() -> {
|
||||
existingBoats.add(boat);
|
||||
setPlayerBoat();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -202,7 +205,7 @@ public class VisualiserRaceState extends RaceState {
|
||||
|
||||
if (getPlayerBoatID() != 0) {
|
||||
|
||||
for (VisualiserBoat boat : getBoats()) {
|
||||
for (VisualiserBoat boat : new ArrayList<>(getBoats())) {
|
||||
|
||||
if (boat.getSourceID() == getPlayerBoatID()) {
|
||||
boat.setClientBoat(true);
|
||||
|
||||
Reference in New Issue
Block a user