summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-07 13:22:49 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-07 13:22:49 +0200
commit6d5df2a42e09f4561f976c6f994471c1d5dba7ce (patch)
treeb5ecedea9cc7026b1297c38c3b4e06fba9c03942
parent5c9deee8dcd0299176c3a4d95af11bc3ca514f08 (diff)
Add radius to the last nested for-loops in Quadtree::raise().
-rw-r--r--quadtree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/quadtree.cpp b/quadtree.cpp
index 396c18f..d591730 100644
--- a/quadtree.cpp
+++ b/quadtree.cpp
@@ -401,10 +401,10 @@ void Quadtree::raise(float x, float z, float radius, float focus, float strength
}
/* refill nodes and remake VBOs */
- for(int nx = x-radius-1; nx < x+chunk_size; nx+=chunk_size) {
+ for(int nx = x-radius-1; nx < x+radius+chunk_size; nx+=chunk_size) {
if(nx < 0 || nx >= width-1)
continue;
- for(int nz = z-radius-1; nz < z+chunk_size; nz+=chunk_size) {
+ for(int nz = z-radius-1; nz < z+radius+chunk_size; nz+=chunk_size) {
if(nz < 0 || nz >= height-1)
continue;
QuadNode *node = find(nx, nz);