mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-15 16:05:28 +00:00
Added a security radius for flying
This commit is contained in:
parent
432eb36b83
commit
5c2a2ecd6d
@ -572,7 +572,7 @@ class Entity extends stdClass{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isSupport(Vector3 $pos, $radius = 0.85){
|
public function isSupport(Vector3 $pos, $radius = 1){
|
||||||
$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 and $diff < 1.2){
|
if($me->distance($pos) < $radius and $diff > 0 and $diff < 1.2){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user