Fixed player boat not being highlighted.

#story[1095]
This commit is contained in:
fjc40
2017-08-15 22:41:43 +12:00
parent a4755ed88b
commit bcb6b79f8d
4 changed files with 6 additions and 5 deletions
@@ -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);