mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Fixed support check height difference
This commit is contained in:
parent
7388a32869
commit
432eb36b83
1 changed files with 1 additions and 2 deletions
|
|
@ -347,7 +347,6 @@ class Entity extends stdClass{
|
||||||
}
|
}
|
||||||
}elseif($this->class === ENTITY_PLAYER){
|
}elseif($this->class === ENTITY_PLAYER){
|
||||||
if($support === false and $this->player->gamemode !== CREATIVE){
|
if($support === false and $this->player->gamemode !== CREATIVE){
|
||||||
console("flying!");
|
|
||||||
if($this->fallY === false or $this->fallStart === false){
|
if($this->fallY === false or $this->fallStart === false){
|
||||||
$this->fallY = $y;
|
$this->fallY = $y;
|
||||||
$this->fallStart = microtime(true);
|
$this->fallStart = microtime(true);
|
||||||
|
|
@ -576,7 +575,7 @@ class Entity extends stdClass{
|
||||||
public function isSupport(Vector3 $pos, $radius = 0.85){
|
public function isSupport(Vector3 $pos, $radius = 0.85){
|
||||||
$me = new Vector3($this->x - 0.5, $pos->y, $this->z - 0.5);
|
$me = new Vector3($this->x - 0.5, $pos->y, $this->z - 0.5);
|
||||||
$diff = $this->y - $pos->y;
|
$diff = $this->y - $pos->y;
|
||||||
if($me->distance($pos) < $radius and $diff > 0.8 and $diff < 1.2){
|
if($me->distance($pos) < $radius and $diff > 0 and $diff < 1.2){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue