mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Make on-ground checking less fussy
This commit is contained in:
parent
060426ff12
commit
d8c90be5b8
@ -1378,8 +1378,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
protected function checkGroundState(float $movX, float $movY, float $movZ, float $dx, float $dy, float $dz){
|
protected function checkGroundState(float $movX, float $movY, float $movZ, float $dx, float $dy, float $dz){
|
||||||
if(!$this->onGround or $movY != 0){
|
if(!$this->onGround or $movY != 0){
|
||||||
$bb = clone $this->boundingBox;
|
$bb = clone $this->boundingBox;
|
||||||
$bb->minY = $this->y - 0.01;
|
$bb->minY = $this->y - 0.1;
|
||||||
$bb->maxY = $this->y + 0.01;
|
$bb->maxY = $this->y + 0.1;
|
||||||
|
|
||||||
if(count($this->level->getCollisionBlocks($bb, true)) > 0){
|
if(count($this->level->getCollisionBlocks($bb, true)) > 0){
|
||||||
$this->onGround = true;
|
$this->onGround = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user