Improved entity movement updates

This commit is contained in:
Shoghi Cervantes 2014-09-29 12:59:01 +02:00
parent b0bd927545
commit f5822c6de8
3 changed files with 4 additions and 1 deletions

View File

@ -1156,6 +1156,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->directDataPacket($pk);
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
}else{
$this->updateMovement();
$this->forceMovement = null;
}
}

View File

@ -98,6 +98,7 @@ class DroppedItem extends Entity{
if($this->age > 6000){
$this->kill();
}
$this->updateMovement();
return !$this->onGround or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0);

View File

@ -468,7 +468,6 @@ abstract class Entity extends Position implements Metadatable{
}
$hasUpdate = false;
$this->updateMovement();
$this->checkBlockCollision();
@ -579,6 +578,8 @@ abstract class Entity extends Position implements Metadatable{
$hasUpdate = $this->entityBaseTick();
$this->updateMovement();
//if($this->isStatic())
return true;
//return !($this instanceof Player);