Draws track for racing boats only to reduce information clutter.
- Add track point only when boat status is "Racing" #story[782]
This commit is contained in:
@@ -65,7 +65,9 @@ public class StreamedRace extends Race {
|
||||
boat.setCurrentLeg(legs.get(legNumber));
|
||||
}
|
||||
|
||||
if (boatStatus == BoatStatus.DNF) {
|
||||
if (boatStatus == BoatStatus.RACING) {
|
||||
boat.addTrackPoint(boat.getCurrentPosition());
|
||||
} else if (boatStatus == BoatStatus.DNF) {
|
||||
boat.setDnf(true);
|
||||
} else if (boatStatus == BoatStatus.FINISHED || legNumber > raceData.getLegs().size()) {
|
||||
boatsFinished++;
|
||||
|
||||
@@ -142,7 +142,6 @@ public abstract class Race implements Runnable {
|
||||
if (boat != null && !boat.isFinished()) {
|
||||
updatePosition(boat, Math.round(1000 / lastFPS) > 20 ? 15 : Math.round(1000 / lastFPS));
|
||||
checkPosition(boat, totalTimeElapsed);
|
||||
boat.addTrackPoint(boat.getCurrentPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user