Visualiser:
Fixed the issue where a boat's time since last mark started counting from when the race screen loaded. It now starts counting when the race actually starts.
This commit is contained in:
@@ -328,6 +328,12 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
if (Duration.between(boat.getTimeSinceLastMark(), raceClock.getTime()).getSeconds() < 0) {
|
||||
boat.setTimeSinceLastMark(raceClock.getTime());
|
||||
}
|
||||
|
||||
//If the race hasn't started, we set the time since last mark to the current time, to ensure we don't start counting until the race actually starts.
|
||||
if (boat.isStarted() == false) {
|
||||
boat.setTimeSinceLastMark(raceClock.getTime());
|
||||
}
|
||||
|
||||
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()), boat.getFormattedEstTime(), boat.getTimeSinceLastMark());
|
||||
//TODO this needs to be fixed.
|
||||
drawTrack(boat, boatColours.get(sourceID));
|
||||
|
||||
Reference in New Issue
Block a user