fix growup, lightmap experiments with willowisp
[supertux.git] / src / collision_grid_iterator.hpp
index 0f78777..6c2506b 100644 (file)
@@ -21,6 +21,7 @@
 #define __COLLISION_GRID_ITERATOR_H__
 
 #include "math/rect.hpp"
+#include "msg.hpp"
 
 class CollisionGrid;
 
@@ -46,16 +47,16 @@ public:
     end_y = int(bbox.p2.y / grid.cell_height) + 2;
     if(end_y > (int) grid.cells_y)
       end_y = grid.cells_y;
+    
+    timestamp = grid.iterator_timestamp++;
+    entry = 0;
 
     if(start_x >= end_x) {
-      printf("bad region.\n");
+      msg_debug("bad region");
       y = 0;
       end_y = 0;
       return;
     }
-
-    timestamp = grid.iterator_timestamp++;
-    entry = 0;
   }
 
   MovingObject* next()