Small refactoring for previous commit.

This commit is contained in:
MobiusDev 2017-09-26 21:37:19 +00:00
parent 895cf3b173
commit e2efcc4170
5 changed files with 15 additions and 20 deletions

View File

@ -273,12 +273,11 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{
return null;
return _blocks[x][y];
}
return _blocks[x][y];
return null;
}
/**

View File

@ -273,12 +273,11 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{
return null;
return _blocks[x][y];
}
return _blocks[x][y];
return null;
}
/**

View File

@ -273,12 +273,11 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{
return null;
return _blocks[x][y];
}
return _blocks[x][y];
return null;
}
/**

View File

@ -271,12 +271,11 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{
return null;
return _blocks[x][y];
}
return _blocks[x][y];
return null;
}
/**

View File

@ -273,12 +273,11 @@ public class GeoEngine
final int y = geoY / GeoStructure.BLOCK_CELLS_Y;
// if x or y is out of array return null
if ((x >= GeoStructure.GEO_BLOCKS_X) || (y >= GeoStructure.GEO_BLOCKS_Y))
if ((x < GeoStructure.GEO_BLOCKS_X) && (y < GeoStructure.GEO_BLOCKS_Y))
{
return null;
return _blocks[x][y];
}
return _blocks[x][y];
return null;
}
/**