Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2281)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2283)
@@ -33,5 +33,7 @@
 	/////////////
 	//-- PART 1: process finished occlusion queries
-	
+	//mHierarchyInterface->TraverseNode2(mHierarchyInterface->GetHierarchyRoot());
+	//return;
+
 	while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty())
 	{
@@ -108,21 +110,12 @@
 					continue;
 				}
-				if (mHierarchyInterface->IsLeaf(node))
-				{
-					if (mHierarchyInterface->IsNodeVisible(node))
-						CullingLogManager::GetSingleton()->LogMessage("u");
-					else
-						CullingLogManager::GetSingleton()->LogMessage("g");
-				}
-				
+								
 				if (mHierarchyInterface->IsNodeFullyVisible(node))
 				{
-					CullingLogManager::GetSingleton()->LogMessage("here8");
 					// node fully visible => test only random leaves
 					for (int i = 0; i < mRandomCandidates; ++ i)
 					{
-						CullingLogManager::GetSingleton()->LogMessage("z");
 						HierarchyNode *randomLeaf = mHierarchyInterface->GetRandomLeaf(node);
-						CullingLogManager::GetSingleton()->LogMessage("c");
+						
 						if (!randomLeaf)
 							continue;
@@ -136,9 +129,7 @@
 						queryQueue.push(QueryPair(node, 
 							mHierarchyInterface->IssueNodeOcclusionQuery(node)));
-						
-							CullingLogManager::GetSingleton()->LogMessage("a");
-						mHierarchyInterface->TraverseNode2(node);
-							CullingLogManager::GetSingleton()->LogMessage("b");
 					}
+
+					mHierarchyInterface->TraverseNode2(node);
 
 					continue;
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2280)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2283)
@@ -2025,5 +2025,5 @@
 		return;
 	}
-Ogre::LogManager::getSingleton().logMessage("here99");
+
     Root::getSingleton()._setCurrentSceneManager(this);
 	mActiveQueuedRenderableVisitor->targetSceneMgr = this;
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2281)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2283)
@@ -62,6 +62,6 @@
 	
 	std::vector<Octree *> nodes;
-
-	//LogManager::getSingleton().logMessage("***");
+	nodes.reserve(8);
+
 	for (int i = 0; i < 8; ++ i)
 	{
@@ -70,4 +70,7 @@
 		int z = i & 1;
 	
+		//std::stringstream d; d << x << " " << y << " " << z;
+		//Ogre::LogManager::getSingleton().logMessage(d.str());
+
 		if ((child = octree->mChildren[x][y][z]) != NULL)
 		{
@@ -76,8 +79,15 @@
 	}
 
+	//std::stringstream str; str << "nodes: " << nodes.size();
+	//Ogre::LogManager::getSingleton().logMessage(str.str());
+
 	if (nodes.empty())
 		return NULL;
 
-	int r = (int) (rand() * (float)nodes.size());
+	int r = (int)(((float)rand() / RAND_MAX) * ((float)nodes.size() - 0.5f));
+
+	//std::stringstream str2;
+	//str2 << "rand: " << r;
+	//Ogre::LogManager::getSingleton().logMessage(str2.str());
 
 	return GetRandomLeaf(nodes[r]);
@@ -101,4 +111,8 @@
 	if (!octree->mNodes.empty())
 	{
+		RenderNodeRecursive(node);
+	}
+
+/*
 		// render everything from here
 		if (octree->isOctreeFullyVisible())
@@ -133,4 +147,5 @@
 			mDistanceQueue->push(nextChild);
 	}
+	*/
 }
 //-----------------------------------------------------------------------
@@ -206,5 +221,5 @@
 	
 	Octree *nextChild;
-	//LogManager::getSingleton().logMessage("***");
+	
 	for (int i = 0; i < 8; ++ i)
 	{
@@ -212,9 +227,6 @@
 		int y = (i & 2) / 2;
 		int z = i & 1;
-		Ogre::LogManager::getSingleton().logMessage("y");
-		//std::stringstream d; d << "x " << x << " y " << y << " z " << z;
-		//LogManager::getSingleton().logMessage(d.str());
-
-		if ((nextChild = octant->mChildren[x][y][z]) != NULL)
+		
+			if ((nextChild = octant->mChildren[x][y][z]) != NULL)
 		{
 			DetermineFullVisibility(nextChild);
