Fixed boat track rendering (points were added before boat position set)
#story[782]
This commit is contained in:
@@ -217,9 +217,9 @@ public abstract class Race implements Runnable {
|
||||
|
||||
for (Boat boat : startingBoats) {
|
||||
if (boat != null && !boat.isFinished()) {
|
||||
boat.addTrackPoint(boat.getCurrentPosition());
|
||||
updatePosition(boat, Math.round(1000 / lastFPS) > 20 ? 15 : Math.round(1000 / lastFPS));
|
||||
checkPosition(boat, totalTimeElapsed);
|
||||
boat.addTrackPoint(boat.getCurrentPosition());
|
||||
}
|
||||
}
|
||||
if (timerEnabled)
|
||||
|
||||
@@ -34,6 +34,7 @@ public class RaceClock {
|
||||
this.zoneId = zoneId;
|
||||
this.timeString = new SimpleStringProperty();
|
||||
this.time = (new Date(utcTime)).toInstant().atZone(zoneId);
|
||||
setTime(time);
|
||||
}
|
||||
|
||||
public static ZonedDateTime getCurrentZonedDateTime(GPSCoordinate gpsCoordinate) {
|
||||
|
||||
@@ -345,7 +345,7 @@ public class ResizableRaceCanvas extends Canvas {
|
||||
if (raceAnno)
|
||||
displayText(boat.toString(), boat.getAbbrev(), boat.getVelocity(), this.map.convertGPS(boat.getCurrentPosition()));
|
||||
//TODO this needs to be fixed.
|
||||
//drawTrack(boat, colours.get(currentColour));
|
||||
drawTrack(boat, colours.get(currentColour));
|
||||
currentColour = (currentColour + 1) % colours.size();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user