Fixed items getting corrupted pickup delay, not being able to be killed by other damage sources

This commit is contained in:
Shoghi Cervantes
2015-05-28 22:17:12 +02:00
parent ce59703dd0
commit 03f178379e
10 changed files with 38 additions and 37 deletions

View File

@ -178,7 +178,7 @@ abstract class Projectile extends Entity{
$this->hadCollision = false;
}
if(!$this->onGround or $this->motionX != 0 or $this->motionY != 0 or $this->motionZ != 0){
if(!$this->onGround or abs($this->motionX) > 0.00001 or abs($this->motionY) > 0.00001 or abs($this->motionZ) > 0.00001){
$f = sqrt(($this->motionX ** 2) + ($this->motionZ ** 2));
$this->yaw = (atan2($this->motionX, $this->motionZ) * 180 / M_PI);
$this->pitch = (atan2($this->motionY, $f) * 180 / M_PI);