mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 22:30:01 +00:00
Oops distance
This commit is contained in:
parent
5ec4b3f46f
commit
cd607b0cec
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user