mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Explosion: fixed ray trace getting stuck on a block when it encounters an empty subchunk
this might have caused unexpected behaviour in large caves.
This commit is contained in:
parent
9e1f6a2486
commit
95c32d26df
@ -123,6 +123,10 @@ class Explosion{
|
|||||||
$vBlock->y = $pointerY >= $y ? $y : $y - 1;
|
$vBlock->y = $pointerY >= $y ? $y : $y - 1;
|
||||||
$vBlock->z = $pointerZ >= $z ? $z : $z - 1;
|
$vBlock->z = $pointerZ >= $z ? $z : $z - 1;
|
||||||
|
|
||||||
|
$pointerX += $vector->x;
|
||||||
|
$pointerY += $vector->y;
|
||||||
|
$pointerZ += $vector->z;
|
||||||
|
|
||||||
if(!$this->subChunkHandler->moveTo($vBlock->x, $vBlock->y, $vBlock->z)){
|
if(!$this->subChunkHandler->moveTo($vBlock->x, $vBlock->y, $vBlock->z)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -137,10 +141,6 @@ class Explosion{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pointerX += $vector->x;
|
|
||||||
$pointerY += $vector->y;
|
|
||||||
$pointerZ += $vector->z;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user