mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 06:50:12 +01:00
Fix vehicle movement check
This commit is contained in:
parent
a18b1b7ef1
commit
1dc6ad1df0
1 changed files with 4 additions and 4 deletions
|
@ -211,9 +211,9 @@
|
|||
+ double currDeltaY = toY - y;
|
||||
+ double currDeltaZ = toZ - z;
|
||||
+ d7 = Math.max(d7, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
|
||||
+ double otherFieldX = d3 - this.vehicleLastGoodX;
|
||||
+ double otherFieldY = d4 - this.vehicleLastGoodY;
|
||||
+ double otherFieldZ = d5 - this.vehicleLastGoodZ;
|
||||
+ double otherFieldX = toX - this.vehicleLastGoodX;
|
||||
+ double otherFieldY = toY - this.vehicleLastGoodY;
|
||||
+ double otherFieldZ = toZ - this.vehicleLastGoodZ;
|
||||
+ d7 = Math.max(d7, (otherFieldX * otherFieldX + otherFieldY * otherFieldY + otherFieldZ * otherFieldZ) - 1);
|
||||
+ // Paper end - fix large move vectors killing the server
|
||||
+
|
||||
|
@ -251,7 +251,7 @@
|
|||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Prevent moving into unloaded chunks
|
||||
+ if (d7 - d6 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
+ if (d7 - d6 > Math.max(100.0, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
+ // CraftBukkit end
|
||||
LOGGER.warn(
|
||||
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5
|
||||
|
|
Loading…
Reference in a new issue