>= <= on move

This commit is contained in:
Shoghi Cervantes 2015-03-25 20:00:55 +01:00
parent d19631226f
commit 7d1313c63d

View File

@ -1118,8 +1118,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$diffX = $this->x - $this->newPosition->x;
$diffZ = $this->z - $this->newPosition->z;
$diffY = $this->y - $this->newPosition->y;
if($diffY > -0.5 or $diffY < 0.5){
$diffY = 0;
if($diffY >= -0.5 or $diffY <= 0.5){
$diffY = 0;
}
$diff = $diffX ** 2 + $diffY ** 2 + $diffZ ** 2;