mirror of https://github.com/skeeto/pixelcity.git
Fixed memory getting trashed when camera leaves world bounds. (Only affects dev mod, not screen saver.)
This commit is contained in:
parent
7eee6e143d
commit
1ab199fb3f
|
@ -95,10 +95,10 @@ void VisibleUpdate (void)
|
||||||
right = 0;
|
right = 0;
|
||||||
//Now mark the block around us the might be visible
|
//Now mark the block around us the might be visible
|
||||||
for (x = grid_x - left; x <= grid_x + right; x++) {
|
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;
|
continue;
|
||||||
for (y = grid_z - back; y <= grid_z + front; y++) {
|
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;
|
continue;
|
||||||
vis_grid[x][y] = true;
|
vis_grid[x][y] = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue