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