mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
onGround fix
This commit is contained in:
parent
33fe60364d
commit
6a2eccfb65
1 changed files with 3 additions and 1 deletions
|
|
@ -632,8 +632,10 @@ class Entity extends Position
|
||||||
if($b != false && ($b->isSolid && $b->boundingBox->intersectsWith($aABB))){
|
if($b != false && ($b->isSolid && $b->boundingBox->intersectsWith($aABB))){
|
||||||
$lastY = $this->speedY;
|
$lastY = $this->speedY;
|
||||||
$this->speedY = $b->boundingBox->calculateYOffset($this->boundingBox, $this->speedY);
|
$this->speedY = $b->boundingBox->calculateYOffset($this->boundingBox, $this->speedY);
|
||||||
if($this->speedY == 0 && $lastY > 0){
|
if($this->speedY == 0 && $lastY != 0){
|
||||||
$support = true;
|
$support = true;
|
||||||
|
}elseif($this->speedY != 0){
|
||||||
|
$support = false;
|
||||||
}
|
}
|
||||||
$this->speedX = $b->boundingBox->calculateXOffset($this->boundingBox, $this->speedX);
|
$this->speedX = $b->boundingBox->calculateXOffset($this->boundingBox, $this->speedX);
|
||||||
$this->speedZ = $b->boundingBox->calculateZOffset($this->boundingBox, $this->speedZ);
|
$this->speedZ = $b->boundingBox->calculateZOffset($this->boundingBox, $this->speedZ);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue