Changed static_cast to FloorC
This commit is contained in:
parent
68218f6ae6
commit
9d07be62d3
@ -1859,7 +1859,7 @@ bool cChunkMap::ForEachEntityInBox(const cBoundingBox & a_Box, cEntityCallback &
|
|||||||
void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, cVector3iArray & a_BlocksAffected)
|
void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, cVector3iArray & a_BlocksAffected)
|
||||||
{
|
{
|
||||||
// Don't explode if outside of Y range (prevents the following test running into unallocated memory):
|
// Don't explode if outside of Y range (prevents the following test running into unallocated memory):
|
||||||
if (!cChunkDef::IsValidHeight(static_cast<int>(a_BlockY)))
|
if (!cChunkDef::IsValidHeight(FloorC(a_BlockY)))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user