Cap Minimum Velcoity to 0.001. The client flips out at smaller values
This commit is contained in:
parent
b0888e8231
commit
5545a5473c
|
@ -0,0 +1,26 @@
|
|||
From 9ea913497512111e043bb0007d0765a9003ce979 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Mon, 5 Aug 2013 20:17:20 +1000
|
||||
Subject: [PATCH] Cap Minimum Velocity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 65a77dc..abac59c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -178,9 +178,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
}
|
||||
|
||||
public void setVelocity(Vector vel) {
|
||||
- entity.motX = vel.getX();
|
||||
- entity.motY = vel.getY();
|
||||
- entity.motZ = vel.getZ();
|
||||
+ entity.motX = Math.max( vel.getX(), 0.001 );
|
||||
+ entity.motY = Math.max( vel.getY(), 0.001 );
|
||||
+ entity.motZ = Math.max( vel.getZ(), 0.001 );
|
||||
entity.velocityChanged = true;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.1.2
|
||||
|
Loading…
Reference in New Issue