mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Skip getting bigger bounding boxes on higher tick rates
This commit is contained in:
parent
eef33d64e6
commit
4a8ca96aaa
@ -1156,7 +1156,7 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
//TODO: big messy loop
|
//TODO: big messy loop
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
$list = $this->level->getCollisionCubes($this, $this->boundingBox->addCoord($dx, $dy, $dz), false);
|
$list = $this->level->getCollisionCubes($this, $this->level->getTickRate() > 1 ? $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz) : $this->boundingBox->addCoord($dx, $dy, $dz), false);
|
||||||
|
|
||||||
foreach($list as $bb){
|
foreach($list as $bb){
|
||||||
$dy = $bb->calculateYOffset($this->boundingBox, $dy);
|
$dy = $bb->calculateYOffset($this->boundingBox, $dy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user