mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +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) {
|
||||
if (lastTimeValid == 0) {
|
||||
lastTimeValid = timeValid - 200;
|
||||
moveTo(newXValue, newYValue, rotation);
|
||||
}
|
||||
framesToMove = Math.round((frameRate / (1000.0f / (timeValid - lastTimeValid))));
|
||||
double dx = newXValue - boatPoly.getLayoutX();
|
||||
double dy = newYValue - boatPoly.getLayoutY();
|
||||
|
||||
xIncrement = dx / framesToMove;
|
||||
yIncrement = dy / framesToMove;
|
||||
moveTo(newXValue, newYValue, rotation);
|
||||
// framesToMove = Math.round((frameRate / (1000.0f / (timeValid - lastTimeValid))));
|
||||
// double dx = newXValue - boatPoly.getLayoutX();
|
||||
// double dy = newYValue - boatPoly.getLayoutY();
|
||||
//
|
||||
// xIncrement = dx / framesToMove;
|
||||
// yIncrement = dy / framesToMove;
|
||||
|
||||
destinationSet = true;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.logging.Logger;
|
||||
public class MainServerThread extends Observable implements Runnable, ClientConnectionDelegate{
|
||||
|
||||
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 Thread thread;
|
||||
|
||||
Reference in New Issue
Block a user