mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fixed Entity->getLineOfSight()
This commit is contained in:
parent
13ec046f0d
commit
9ede8177df
@ -943,7 +943,7 @@ abstract class Entity extends Position implements Metadatable{
|
||||
|
||||
$pos = new Vector3(
|
||||
($this->boundingBox->minX + $this->boundingBox->maxX) / 2,
|
||||
$this->boundingBox->minY - $this->ySize/* + $this->height*/,
|
||||
$this->boundingBox->minY - $this->ySize,
|
||||
($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2
|
||||
);
|
||||
|
||||
|
@ -188,7 +188,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
|
||||
$blocks = [];
|
||||
$itr = new BlockIterator($this->level, $this->getPosition(), $this->getEyeHeight(), $maxDistance);
|
||||
$itr = new BlockIterator($this->level, $this->getPosition(), $this->getDirectionVector(), $this->getEyeHeight(), $maxDistance);
|
||||
|
||||
while($itr->valid()){
|
||||
$itr->next();
|
||||
|
Loading…
x
Reference in New Issue
Block a user