Draws track for racing boats only to reduce information clutter.

- Add track point only when boat status is "Racing"

#story[782]
main
cbt24 9 years ago
parent f27dbc29b0
commit c038010bd2

@ -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());
}
}
}

Loading…
Cancel
Save