Player: removed superfluous null-check from setMotion()

this is already checked by broadcastMotion().
This commit is contained in:
Dylan K. Taylor 2018-03-10 17:08:00 +00:00
parent 8a86e0825b
commit a5e87484d9

View File

@ -1640,9 +1640,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
public function setMotion(Vector3 $mot){
if(parent::setMotion($mot)){
if($this->chunk !== null){
$this->broadcastMotion();
}
$this->broadcastMotion();
if($this->motionY > 0){
$this->startAirTicks = (-log($this->gravity / ($this->gravity + $this->drag * $this->motionY)) / $this->drag) * 2 + 5;