mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
ExperienceOrb: fix passing invalid argument to multi-signature Vector3::subtract()
I knew I should have scrapped these multi-signature functions years ago...
This commit is contained in:
parent
75a2d79671
commit
c9cd6ee038
@ -199,7 +199,7 @@ class ExperienceOrb extends Entity{
|
||||
$this->setTargetPlayer($currentTarget);
|
||||
|
||||
if($currentTarget !== null){
|
||||
$vector = $currentTarget->getPosition()->add(0, $currentTarget->getEyeHeight() / 2, 0)->subtract($this)->divide(self::MAX_TARGET_DISTANCE);
|
||||
$vector = $currentTarget->getPosition()->add(0, $currentTarget->getEyeHeight() / 2, 0)->subtract($this->location)->divide(self::MAX_TARGET_DISTANCE);
|
||||
|
||||
$distance = $vector->lengthSquared();
|
||||
if($distance < 1){
|
||||
|
Loading…
x
Reference in New Issue
Block a user