Fixed memory getting trashed when camera leaves world bounds. (Only affects dev mod, not screen saver.)

This commit is contained in:
Shamus Young 2009-05-05 18:48:49 +00:00
parent 7eee6e143d
commit 1ab199fb3f
1 changed files with 2 additions and 2 deletions

View File

@ -95,10 +95,10 @@ void VisibleUpdate (void)
right = 0;
//Now mark the block around us the might be visible
for (x = grid_x - left; x <= grid_x + right; x++) {
if (x < 0 || x >= WORLD_SIZE) //just in case the camera leaves the world map
if (x < 0 || x >= GRID_SIZE) //just in case the camera leaves the world map
continue;
for (y = grid_z - back; y <= grid_z + front; y++) {
if (y < 0 || y >= WORLD_SIZE) //just in case the camera leaves the world map
if (y < 0 || y >= GRID_SIZE) //just in case the camera leaves the world map
continue;
vis_grid[x][y] = true;
}