mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
partway through fixing boat movement to be updated from the data valid timestamp rather than the data sent timestamp #pair[kre39, ptg19] #story[820]
This commit is contained in:
@@ -146,21 +146,23 @@ public class BoatGroup extends RaceObject{
|
||||
}
|
||||
|
||||
public void setDestination (double newXValue, double newYValue, double rotation, int... raceIds) {
|
||||
destinationSet = true;
|
||||
boat.setVelocity(StreamParser.boatSpeeds.get((long)boat.getId()));
|
||||
if (hasRaceId(raceIds)) {
|
||||
this.pixelVelocityX = (newXValue - boatPoly.getLayoutX()) / expectedUpdateInterval;
|
||||
this.pixelVelocityY = (newYValue - boatPoly.getLayoutY()) / expectedUpdateInterval;
|
||||
this.rotationalGoal = rotation;
|
||||
calculateRotationalVelocity();
|
||||
rotateTo(rotation);
|
||||
if (wakeGenerationDelay > 0) {
|
||||
wake.rotate(rotationalGoal);
|
||||
wakeGenerationDelay--;
|
||||
} else {
|
||||
wake.setRotationalVelocity(rotationalVelocity, rotationalGoal, pixelVelocityX, pixelVelocityY);
|
||||
}
|
||||
}
|
||||
moveGroupBy(newXValue - boatPoly.getLayoutX(), newYValue - boatPoly.getLayoutY(), rotation);
|
||||
|
||||
// destinationSet = true;
|
||||
// boat.setVelocity(StreamParser.boatSpeeds.get((long)boat.getId()));
|
||||
// if (hasRaceId(raceIds)) {
|
||||
// this.pixelVelocityX = (newXValue - boatPoly.getLayoutX()) / expectedUpdateInterval;
|
||||
// this.pixelVelocityY = (newYValue - boatPoly.getLayoutY()) / expectedUpdateInterval;
|
||||
// this.rotationalGoal = rotation;
|
||||
// calculateRotationalVelocity();
|
||||
// rotateTo(rotation);
|
||||
// if (wakeGenerationDelay > 0) {
|
||||
// wake.rotate(rotationalGoal);
|
||||
// wakeGenerationDelay--;
|
||||
// } else {
|
||||
// wake.setRotationalVelocity(rotationalVelocity, rotationalGoal, pixelVelocityX, pixelVelocityY);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public void setDestination (double newXValue, double newYValue, int... raceIDs) {
|
||||
|
||||
Reference in New Issue
Block a user