mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Remove some more Vector3 mutations
This commit is contained in:
@ -195,11 +195,7 @@ class ExperienceOrb extends Entity{
|
||||
|
||||
$distance = $vector->lengthSquared();
|
||||
if($distance < 1){
|
||||
$diff = $vector->normalize()->multiply(0.2 * (1 - sqrt($distance)) ** 2);
|
||||
|
||||
$this->motion->x += $diff->x;
|
||||
$this->motion->y += $diff->y;
|
||||
$this->motion->z += $diff->z;
|
||||
$this->motion = $this->motion->addVector($vector->normalize()->multiply(0.2 * (1 - sqrt($distance)) ** 2));
|
||||
}
|
||||
|
||||
if($currentTarget->getXpManager()->canPickupXp() and $this->boundingBox->intersectsWith($currentTarget->getBoundingBox())){
|
||||
|
Reference in New Issue
Block a user