Fix ext bounds warnings
This commit is contained in:
parent
d63d6a1ca5
commit
0c2f9e86f6
|
@ -197,12 +197,14 @@ s32 find_wall_collisions(struct WallCollisionData *colData) {
|
|||
|
||||
colData->numWalls = 0;
|
||||
|
||||
#if EXTENDED_BOUNDS_MODE != 3
|
||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||
return numCollisions;
|
||||
}
|
||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||
return numCollisions;
|
||||
}
|
||||
#endif
|
||||
|
||||
// World (level) consists of a 16x16 grid. Find where the collision is on
|
||||
// the grid (round toward -inf)
|
||||
|
@ -326,12 +328,14 @@ f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) {
|
|||
z = (s16) posZ;
|
||||
*pceil = NULL;
|
||||
|
||||
#if EXTENDED_BOUNDS_MODE != 3
|
||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||
return height;
|
||||
}
|
||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||
return height;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Each level is split into cells to limit load, find the appropriate cell.
|
||||
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
||||
|
@ -602,12 +606,14 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) {
|
|||
|
||||
*pfloor = NULL;
|
||||
|
||||
#if EXTENDED_BOUNDS_MODE != 3
|
||||
if (x <= -LEVEL_BOUNDARY_MAX || x >= LEVEL_BOUNDARY_MAX) {
|
||||
return height;
|
||||
}
|
||||
if (z <= -LEVEL_BOUNDARY_MAX || z >= LEVEL_BOUNDARY_MAX) {
|
||||
return height;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Each level is split into cells to limit load, find the appropriate cell.
|
||||
cellX = ((x + LEVEL_BOUNDARY_MAX) / CELL_SIZE) & NUM_CELLS_INDEX;
|
||||
|
|
Loading…
Reference in New Issue