mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Merge branch 'release/3.0' into release/3.1
This commit is contained in:
commit
4d9368f205
@ -602,14 +602,17 @@ abstract class Living extends Entity implements Damageable{
|
||||
$motion = clone $this->motion;
|
||||
|
||||
$motion->x /= 2;
|
||||
$motion->y /= 2;
|
||||
$motion->z /= 2;
|
||||
$motion->x += $x * $f * $base;
|
||||
$motion->y += $base;
|
||||
$motion->z += $z * $f * $base;
|
||||
|
||||
if($motion->y > $base){
|
||||
$motion->y = $base;
|
||||
if($this->onGround){
|
||||
$motion->y /= 2;
|
||||
$motion->y += $base;
|
||||
|
||||
if($motion->y > 0.4){ //this is hardcoded in vanilla
|
||||
$motion->y = 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
$this->setMotion($motion);
|
||||
|
@ -165,7 +165,7 @@ class ExperienceOrb extends Entity{
|
||||
}
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user