Oops distance

This commit is contained in:
Shoghi Cervantes 2015-05-04 17:56:42 +02:00
parent 5ec4b3f46f
commit cd607b0cec

View File

@ -1458,7 +1458,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$dV = $this->getDirectionVector(); $dV = $this->getDirectionVector();
$dot = $dV->dot($this); $dot = $dV->dot($this);
$dot1 = $dV->dot($pos); $dot1 = $dV->dot($pos);
return ($dot1 - $dot) >= -$maxDiff or $this->distanceSquared($pos) > $maxDistance ** 2; return ($dot1 - $dot) >= -$maxDiff and $this->distanceSquared($pos) <= $maxDistance ** 2;
} }
/** /**