Recovered sails smoothing
- Boat default position is now overridden only by collision command - Sails command overrides boat velocity #story[1195]
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user