mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
SPIGOT-2102: Don't reduce the movement limit below vanilla's default
This commit is contained in:
parent
420afc57ef
commit
048849ce51
@ -205,7 +205,7 @@
|
|||||||
+ }
|
+ }
|
||||||
+ speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
+ speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||||
+
|
+
|
||||||
+ if (d10 - d9 > Math.pow((double) (10.0F * (float) i * speed), 2) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) {
|
+ if (d10 - d9 > Math.max(100, Math.pow((double) (10.0F * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(entity.getName()))) {
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved too quickly! " + d6 + "," + d7 + "," + d8);
|
PlayerConnection.LOGGER.warn(entity.getName() + " (vehicle of " + this.player.getName() + ") moved too quickly! " + d6 + "," + d7 + "," + d8);
|
||||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||||
@ -327,7 +327,7 @@
|
|||||||
float f2 = this.player.cB() ? 300.0F : 100.0F;
|
float f2 = this.player.cB() ? 300.0F : 100.0F;
|
||||||
|
|
||||||
- if (d11 - d10 > (double) (f2 * (float) i) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
|
- if (d11 - d10 > (double) (f2 * (float) i) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
|
||||||
+ if (d11 - d10 > Math.pow((double) (10.0F * (float) i * speed), 2) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
|
+ if (d11 - d10 > Math.max(100, Math.pow((double) (10.0F * (float) i * speed), 2)) && (!this.minecraftServer.R() || !this.minecraftServer.Q().equals(this.player.getName()))) {
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
PlayerConnection.LOGGER.warn(this.player.getName() + " moved too quickly! " + d7 + "," + d8 + "," + d9);
|
PlayerConnection.LOGGER.warn(this.player.getName() + " moved too quickly! " + d7 + "," + d8 + "," + d9);
|
||||||
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
|
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
|
||||||
|
Loading…
Reference in New Issue
Block a user