mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Remove redundant if/else in Player->checkGroundState()
This commit is contained in:
parent
81fe00a0a5
commit
dc553142c9
@ -1423,11 +1423,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$bb->minY = $this->y - 0.2;
|
||||
$bb->maxY = $this->y + 0.2;
|
||||
|
||||
if(count($this->level->getCollisionBlocks($bb, true)) > 0){
|
||||
$this->onGround = true;
|
||||
}else{
|
||||
$this->onGround = false;
|
||||
}
|
||||
$this->onGround = count($this->level->getCollisionBlocks($bb, true)) > 0;
|
||||
}
|
||||
$this->isCollided = $this->onGround;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user