mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
ExperienceOrb: stop tracking targets if they die while being tracked
This commit is contained in:
parent
0081e30a89
commit
d3e54db146
@ -165,7 +165,7 @@ class ExperienceOrb extends Entity{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$currentTarget = $this->getTargetPlayer();
|
$currentTarget = $this->getTargetPlayer();
|
||||||
if($currentTarget !== null and $currentTarget->distanceSquared($this) > self::MAX_TARGET_DISTANCE ** 2){
|
if($currentTarget !== null and (!$currentTarget->isAlive() or $currentTarget->distanceSquared($this) > self::MAX_TARGET_DISTANCE ** 2)){
|
||||||
$currentTarget = null;
|
$currentTarget = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user