Fixed player boat not being highlighted.
#story[1095]
This commit is contained in:
@@ -5,7 +5,6 @@ import mock.exceptions.EventConstructionException;
|
|||||||
import mock.model.*;
|
import mock.model.*;
|
||||||
import mock.model.commandFactory.CompositeCommand;
|
import mock.model.commandFactory.CompositeCommand;
|
||||||
import network.Messages.LatestMessages;
|
import network.Messages.LatestMessages;
|
||||||
import network.Messages.RaceSnapshot;
|
|
||||||
import shared.dataInput.*;
|
import shared.dataInput.*;
|
||||||
import shared.enums.XMLFileType;
|
import shared.enums.XMLFileType;
|
||||||
import shared.exceptions.InvalidBoatDataException;
|
import shared.exceptions.InvalidBoatDataException;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package network.Messages;
|
package network.Messages;
|
||||||
|
|
||||||
import network.Messages.Enums.JoinAcceptanceEnum;
|
|
||||||
import network.Messages.Enums.MessageType;
|
import network.Messages.Enums.MessageType;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -103,7 +103,7 @@ public class RaceStatusCommand implements Command {
|
|||||||
|
|
||||||
|
|
||||||
} catch (BoatNotFoundException e) {
|
} 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,7 +183,10 @@ public class VisualiserRaceState extends RaceState {
|
|||||||
|
|
||||||
boat.setCurrentLeg(getLegs().get(0));
|
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) {
|
if (getPlayerBoatID() != 0) {
|
||||||
|
|
||||||
for (VisualiserBoat boat : getBoats()) {
|
for (VisualiserBoat boat : new ArrayList<>(getBoats())) {
|
||||||
|
|
||||||
if (boat.getSourceID() == getPlayerBoatID()) {
|
if (boat.getSourceID() == getPlayerBoatID()) {
|
||||||
boat.setClientBoat(true);
|
boat.setClientBoat(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user