From 6d5df2a42e09f4561f976c6f994471c1d5dba7ce Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sat, 7 May 2011 13:22:49 +0200 Subject: Add radius to the last nested for-loops in Quadtree::raise(). --- quadtree.cpp | 4 ++-- 1 file 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); -- cgit v1.2.3