Recovered sails smoothing

- Boat default position is now overridden only by collision command
- Sails command overrides boat velocity

#story[1195]
main
Connor Taylor-Brown 8 years ago
parent 90c258e9e9
commit 8d9624db96

@ -366,8 +366,8 @@ public class MockRace extends RaceState {
//Checks if the current boat has finished the race or not.
boolean finish = this.isLastLeg(boat.getCurrentLeg());
if (!finish && totalElapsedMilliseconds >= updatePeriodMilliseconds && boat.isVelocityDefault()) {
setBoatSpeed(boat);
if (!finish && totalElapsedMilliseconds >= updatePeriodMilliseconds && !boat.isColliding()) {
if(boat.isVelocityDefault()) setBoatSpeed(boat);
//Calculates the distance travelled, in meters, in the current timeslice.
double distanceTravelledMeters = boat.calculateMetersTravelled(updatePeriodMilliseconds) * this.scaleFactor;

Loading…
Cancel
Save