Send motion to players on downwards movement

This commit is contained in:
Shoghi Cervantes 2015-05-30 17:16:12 +02:00
parent a349f6d4dd
commit b61c54c9cb
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -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;
}