- Adjusted server tick rate to test smoothing

tags : #story[1273]
This commit is contained in:
Alistair McIntyre
2017-09-25 15:32:13 +13:00
parent 376c4d25a8
commit d250c635d8
3 changed files with 18 additions and 9 deletions
+8 -3
View File
@@ -15,8 +15,8 @@ import javafx.beans.property.ReadOnlyLongWrapper;
import javafx.scene.paint.Color;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import seng302.visualiser.fxObjects.assets_3D.BoatObject;
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
import seng302.visualiser.fxObjects.assets_3D.BoatObject;
/**
* Yacht class for the racing boat. <p> Class created to store more variables (eg. boat statuses)
@@ -79,6 +79,7 @@ public class ClientYacht extends Observable {
this.country = country;
this.location = new GeoPoint(57.670341, 11.826856);
this.heading = 120.0; //In degrees
this.headingProperty.set(this.heading);
this.currentVelocity = 0d;
this.boatStatus = 1;
this.colour = Color.rgb(0, 0, 0, 1.0);
@@ -271,7 +272,12 @@ public class ClientYacht extends Observable {
Double oldHeading = getHeadingProperty().get();
Double currHeading = heading;
while (oldHeading.equals(currHeading)) {
oldHeading++;
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
oldHeading += 0.5;
headingProperty.set(oldHeading);
}
}
@@ -314,7 +320,6 @@ public class ClientYacht extends Observable {
}
public ReadOnlyDoubleWrapper getHeadingProperty() {
return headingProperty;
}