mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Improved entity movement updates
This commit is contained in:
parent
b0bd927545
commit
f5822c6de8
@ -1156,6 +1156,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$this->directDataPacket($pk);
|
$this->directDataPacket($pk);
|
||||||
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
|
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
|
||||||
}else{
|
}else{
|
||||||
|
$this->updateMovement();
|
||||||
$this->forceMovement = null;
|
$this->forceMovement = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ class DroppedItem extends Entity{
|
|||||||
if($this->age > 6000){
|
if($this->age > 6000){
|
||||||
$this->kill();
|
$this->kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->updateMovement();
|
$this->updateMovement();
|
||||||
|
|
||||||
return !$this->onGround or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0);
|
return !$this->onGround or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0);
|
||||||
|
@ -468,7 +468,6 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hasUpdate = false;
|
$hasUpdate = false;
|
||||||
$this->updateMovement();
|
|
||||||
|
|
||||||
$this->checkBlockCollision();
|
$this->checkBlockCollision();
|
||||||
|
|
||||||
@ -579,6 +578,8 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
|
|
||||||
$hasUpdate = $this->entityBaseTick();
|
$hasUpdate = $this->entityBaseTick();
|
||||||
|
|
||||||
|
$this->updateMovement();
|
||||||
|
|
||||||
//if($this->isStatic())
|
//if($this->isStatic())
|
||||||
return true;
|
return true;
|
||||||
//return !($this instanceof Player);
|
//return !($this instanceof Player);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user