mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed latency issues caused by clientside movement packets queueing up but currently the trails aren't working anymore #fix #refactor
This commit is contained in:
@@ -210,14 +210,14 @@ public class BoatGroup extends Group {
|
|||||||
double groundSpeed, long timeValid, double frameRate) {
|
double groundSpeed, long timeValid, double frameRate) {
|
||||||
if (lastTimeValid == 0) {
|
if (lastTimeValid == 0) {
|
||||||
lastTimeValid = timeValid - 200;
|
lastTimeValid = timeValid - 200;
|
||||||
moveTo(newXValue, newYValue, rotation);
|
|
||||||
}
|
}
|
||||||
framesToMove = Math.round((frameRate / (1000.0f / (timeValid - lastTimeValid))));
|
moveTo(newXValue, newYValue, rotation);
|
||||||
double dx = newXValue - boatPoly.getLayoutX();
|
// framesToMove = Math.round((frameRate / (1000.0f / (timeValid - lastTimeValid))));
|
||||||
double dy = newYValue - boatPoly.getLayoutY();
|
// double dx = newXValue - boatPoly.getLayoutX();
|
||||||
|
// double dy = newYValue - boatPoly.getLayoutY();
|
||||||
xIncrement = dx / framesToMove;
|
//
|
||||||
yIncrement = dy / framesToMove;
|
// xIncrement = dx / framesToMove;
|
||||||
|
// yIncrement = dy / framesToMove;
|
||||||
|
|
||||||
destinationSet = true;
|
destinationSet = true;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import java.util.logging.Logger;
|
|||||||
public class MainServerThread extends Observable implements Runnable, ClientConnectionDelegate{
|
public class MainServerThread extends Observable implements Runnable, ClientConnectionDelegate{
|
||||||
|
|
||||||
private static final int PORT = 4942;
|
private static final int PORT = 4942;
|
||||||
private static final Integer CLIENT_UPDATES_PER_SECOND = 5;
|
private static final Integer CLIENT_UPDATES_PER_SECOND = 10;
|
||||||
private static final int LOG_LEVEL = 1;
|
private static final int LOG_LEVEL = 1;
|
||||||
|
|
||||||
private Thread thread;
|
private Thread thread;
|
||||||
|
|||||||
Reference in New Issue
Block a user