From b61c54c9cb6424e4899649fb2a942ff310685b70 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 30 May 2015 17:16:12 +0200 Subject: [PATCH] Send motion to players on downwards movement --- src/pocketmine/Player.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 88a5b629f..73ed5b85e 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1365,8 +1365,8 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade public function setMotion(Vector3 $mot){ if(parent::setMotion($mot)){ - if($this->motionY > 0){ - $this->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ); + $this->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ); + if($this->motionY > 0) $this->startAirTicks = (-(log($this->gravity / ($this->gravity + $this->drag * $this->motionY))) / $this->drag) * 2 + 5; }