Index: GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h	(revision 2446)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h	(revision 2459)
@@ -64,4 +64,7 @@
 		this->sysNode = sysNode;
 
+		mStatsOn = false;
+		showDebugOverlay(mStatsOn);
+
     }
 
@@ -82,5 +85,5 @@
 
 		//sysNode->setPosition(mCamera->getPosition() - Vector3(0,1.5,0));
-		sysNode->setPosition(FPSPlayer::thePlayer->getPosition() - Vector3(0,1.5,0));
+		//sysNode->setPosition(FPSPlayer::thePlayer->getPosition() - Vector3(0,1.5,0));
 
         return ExampleFrameListener::frameStarted(evt);     
@@ -259,4 +262,8 @@
 	void createPostproc()
 	{		
+		CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0),
+														"FireHeatCompositor");
+		CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0),
+														"FireHeatCompositor", false);
 		
 		CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0),
@@ -275,15 +282,9 @@
 		CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0),
 														"GTP/PostProc/ToneMap", true);	
-
-
-
-	
-		
-
-		/*
+				
 		CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0),
 														"GTP/PostProc/MotionBlur");
 		CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0),
-														"GTP/PostProc/MotionBlur", true);	*/
+														"GTP/PostProc/MotionBlur", false);
 		
 	}
@@ -291,6 +292,6 @@
 	void chooseSceneManager()
 	{
-		mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
-		//mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
+		//mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
+		mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
 	}
 
@@ -298,6 +299,9 @@
     {
 		std::string occlusion_cfg("OcclusionCulling.cfg");
-		//mSceneMgr->setWorldGeometry(occlusion_cfg);
-		
+		mSceneMgr->setWorldGeometry(occlusion_cfg);
+		
+		Overlay* mainOverlay = OverlayManager::getSingleton().getByName("MORIA/MainOverlay");
+		mainOverlay->show();
+
 		createPostproc();
 
@@ -316,5 +320,5 @@
 		//mCamera->setPosition(0,100,0);
 		//mCamera->lookAt(0,-1,0);
-		mCamera->setFOVy(Radian(Degree(100)));
+		mCamera->setFOVy(Radian(Degree(80)));
 		mCamera->setNearClipDistance(0.001);
 		mCamera->setFarClipDistance(150);
@@ -329,5 +333,5 @@
 		inputStream = ResourceGroupManager::getSingleton().openResource("moria.level");	//towers2.level	
 		World* NXWorld = new World("FrameListener: no, log: html");
-		NXWorld->getPhysXDriver()->createFrameListener(25);
+		NXWorld->getPhysXDriver()->createFrameListener(90);
 		NXScene = NXWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: no"); 
 		s.setScene(NXScene);
@@ -336,15 +340,10 @@
 		s.parseEntryPoints("prmEntryPoints.text");
 
-		NXScene->createActor("FakeFloor", new CubeShape(100,2,100), Vector3(0,-1,0), "static: yes"); 
-		
-/*
-		Body* b = NXScene->createBody("ize",
-							"sphere.mesh",
-							new SphereShape(0.5f),
-							Vector3(5,0,5),
-							"mass: 10");
-		b->getNode()->setScale(0.005,0.005,0.005);
-		b->setGlobalPosition(Vector3(5,10,5));*/
-
+		NXScene->createActor("FakeFloor", new CubeShape(140,2,60), Vector3(0,-1,0), "static: yes"); 
+		NXScene->createActor("FakeCeiling", new CubeShape(140,2,60), Vector3(0,17,0), "static: yes"); 
+		NXScene->createActor("Wall1", new CubeShape(140,16,2), Vector3(0,8,30), "static: yes"); 
+		NXScene->createActor("Wall2", new CubeShape(140,16,2), Vector3(0,8,-30), "static: yes"); 
+		NXScene->createActor("Wall3", new CubeShape(2,16,60), Vector3(70,8,0), "static: yes"); 
+		NXScene->createActor("Wall4", new CubeShape(2,16,60), Vector3(-70,8,0), "static: yes"); 
 /*
 	   ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/Moria/Smoke_Large");
@@ -353,16 +352,5 @@
 	   pSysNode->attachObject(pSys1);
 	   pSysNode->setPosition(-40,-1,-15);*/
-		
-	   /*Entity* object = mSceneMgr->createEntity("object", "head.mesh");
-		object->setMaterialName("GTP/Caustic/Glass");
-		SceneNode* objectNode = rootNode->createChildSceneNode();
-		objectNode->attachObject(object);
-		objectNode->scale(0.1,0.1,0.1);
-		objectNode->rotate(Vector3(0,1,0),Radian(0.2));
-		objectNode->setPosition(-30,2.0,-5);
-		objectNode->_updateBounds();*/
-			
-		//createPlane("p","groundmaterial",Vector3(0,-0.3,0),Vector2(150,150));
-
+	
 		mainLight = mSceneMgr->createLight("MainLight");
 		mainLight->setType(Light::LT_POINT);
@@ -378,15 +366,5 @@
 		//mainLight->setSpotlightRange(Degree(0),Degree(120));
 		mainLight->setAttenuation(200.0, 0, 0, 3);
-/*
-		Light* blueLight = mSceneMgr->createLight("blueLight");
-		blueLight->setType(Light::LT_POINT);
-		blueLight->setCastShadows(true);
-		blueLight->setDiffuseColour(ColourValue(0.45,0.75,0.8));
-		blueLight->setPowerScale(30);
-		blueLight->setAttenuation(40.0, 0, 4, 0);
-		SceneNode* blueLightNode = rootNode->createChildSceneNode();
-		blueLightNode->setPosition(15,10,15);
-		blueLightNode->attachObject(blueLight);*/
-		
+	
 		Vector4 v = mainLight->getAs4DVector();
 
@@ -407,12 +385,27 @@
 
 		PlayerCharacter::frameListenerPriority = 20;
+	
 		gFPSPlayer = new FPSPlayer(NXScene, mSceneMgr, Vector3(0.5, 1.8, 0.3), Vector3(5, 10, 15), 1.6, mCamera, false);
-		gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, true);
+		gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, false);
 		gFPSPlayer->addWeaponModel("sword.mesh", "joint28");
-
-		PlayerCharacter* troll = new PlayerCharacter("troll1", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(15, 10, 15), false);
+	
+		TrollCharacter* troll = new TrollCharacter("troll1", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(15, 10, 15), false);
 		troll->addPlayerMesh("troll.mesh", 0.05, false);
+		troll->addWeaponModel("trollMace.mesh", "RightHand");
+
+		CharacterManager::getSingleton().mScene = NXScene;
+		CharacterManager::getSingleton().mSceneManager = mSceneMgr;
+
 /*
-		for(float i = 0; i< 7; i++)
+		TrollCharacter* troll2 = new TrollCharacter("troll2", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(25, 10, 15), false);
+		troll2->addPlayerMesh("troll.mesh", 0.05, false);
+		troll2->addWeaponModel("trollMace.mesh", "RightHand");
+
+		TrollCharacter* troll3 = new TrollCharacter("troll3", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(35, 10, 15), false);
+		troll3->addPlayerMesh("troll.mesh", 0.05, false);
+		troll3->addWeaponModel("trollMace.mesh", "RightHand");
+*/
+		
+		/*for(float i = 0; i< 7; i++)
 		{
 			float size = 0.5;
@@ -426,12 +419,17 @@
 								ac);
 			b->setCharacterCollisionGroup(NX_CHARACTER_COL_GROUP_PUSHABLE);
-		}
-	*/
-	   ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "MoriaDust");
+			
+		}*/
+		
+	
+	 /*  ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "MoriaDust");
 	   pSys1->setKeepParticlesInLocalSpace(true);
 	   pSysNode = rootNode->createChildSceneNode("psys1");
 	   pSysNode->attachObject(pSys1);
-	   pSysNode->setPosition(0,0,0);
-
+	   pSysNode->setPosition(0,0,0);*/
+
+	//	LightList LL;
+	//	mSceneMgr->_populateLightList(Vector3(0,0,0), 200, LL);
+	//	int numlights = LL.size();
 
 		OgreIlluminationManager::getSingleton().initTechniques();
@@ -467,5 +465,5 @@
 //		gFPSPlayer->setPriority(20);
 //		mRoot->addFrameListener(gFPSPlayer);
-		OgreIlluminationManager::getSingleton().setPriority(40);
+		OgreIlluminationManager::getSingleton().setPriority(100);
 	    mRoot->addFrameListener(&OgreIlluminationManager::getSingleton());
 	  
Index: GTP/trunk/App/Demos/Illum/Ogre/src/Moria/scripts/Moria.7.10.vcproj
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/Moria/scripts/Moria.7.10.vcproj	(revision 2391)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/Moria/scripts/Moria.7.10.vcproj	(revision 2459)
@@ -90,4 +90,5 @@
 				StringPooling="TRUE"
 				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
 				RuntimeLibrary="2"
 				BufferSecurityCheck="FALSE"
