Commits

Anonymous committed d19485b

Removed SaveLoadManager (deprecated)

Comments (0)

Files changed (14)

PolyMain/PolyMain.vcxproj

     <ClInclude Include="include\core\PolyPlugin.h" />
     <ClInclude Include="include\core\PolyPluginManager.h" />
     <ClInclude Include="include\core\PolyResourceManager.h" />
-    <ClInclude Include="include\core\PolySaveLoadListener.h" />
-    <ClInclude Include="include\core\PolySaveLoadManager.h" />
     <ClInclude Include="include\core\PolySystem.h" />
     <ClInclude Include="include\core\PolySystemFactory.h" />
     <ClInclude Include="include\core\PolySystemFactoryRegistrar.h" />
     <ClCompile Include="include\core\PolyLogManager.cpp" />
     <ClCompile Include="include\core\PolyPluginManager.cpp" />
     <ClCompile Include="include\core\PolyResourceManager.cpp" />
-    <ClCompile Include="include\core\PolySaveLoadManager.cpp" />
     <ClCompile Include="include\core\PolySystemManager.cpp" />
     <ClCompile Include="include\core\PolyTaskManager.cpp" />
     <ClCompile Include="include\game\PolyAudioListenerComponent.cpp" />

PolyMain/PolyMain.vcxproj.filters

     <ClInclude Include="include\game\PolyLevelFileSerializerImpl1.h">
       <Filter>game</Filter>
     </ClInclude>
-    <ClInclude Include="include\core\PolySaveLoadManager.h">
-      <Filter>core</Filter>
-    </ClInclude>
-    <ClInclude Include="include\core\PolySaveLoadListener.h">
-      <Filter>core</Filter>
-    </ClInclude>
     <ClInclude Include="include\util\PolyStream.h">
       <Filter>util</Filter>
     </ClInclude>
     <ClCompile Include="include\game\PolyLevelFileSerializerImpl1.cpp">
       <Filter>game</Filter>
     </ClCompile>
-    <ClCompile Include="include\core\PolySaveLoadManager.cpp">
-      <Filter>core</Filter>
-    </ClCompile>
     <ClCompile Include="include\util\PolyBitStream.cpp">
       <Filter>util</Filter>
     </ClCompile>

PolyMain/include/PolyEnvironment.h

 		SafePtr<ComponentManager>	componentMgr;
 		SafePtr<EntityManager>		entityMgr;
 		SafePtr<GameStateManager>	gameStateMgr;
-		SafePtr<SaveLoadManager>	saveLoadMgr;
 		SafePtr<SceneManager>		sceneMgr;
 		SafePtr<LevelManager>		levelMgr;
 		SafePtr<EventHub>			globalEventHub;

PolyMain/include/PolyPrerequisites.cpp

 namespace Poly {
 	Environment gEnv;
 }
-
-
-/**
-\mainpage PolyEngine
-
-Sup bro. Welcome to the wonderpolyland where ponies explode into joy, it's raining dinosaurs and
-everybody walks the rainbow. 
-
-
-1. Five Minute Tutorial
-=======================
-
-1.1 Project creation
------------
-1.1.1 Visual Studio 2010
------------
-Decide a name for your project. It does not have to be the final project name, but having an unique
-name for each project will make your life easier. Lets name it 'Cargo' for now.
- - Create a new folder called 'Cargo'.
- - Create a new, empty visual studio Win32 project inside this folder.
- - Create 4 folders: bin for executables, include for headers, src for the source and content for all data.
-In Visual Studio, create CargoPrerequisites.h and CargoPrerequisites.cpp.
-This will be our precompiled header. Create main.cpp.
-
-CargoPrerequisites.cpp:
-<pre><code>#include "CargoPrerequisites.h"
-</code></pre>
-
-CargoPrerequisites.h:
-<pre><code>#ifndef CargoPrerequisites_h
-#define CargoPrerequisites_h
-
-#include <Poly.h>
-using namespace Poly;
-
-#endif
-</code></pre>
-
-main.cpp:
-<pre><code>#include "CargoPrerequisites.h"
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
-	Engine* engine = 0;
-	try {
-		engine = new Engine("game.cfg");
-		engine->initialise();
-		engine->run();
-		
-		delete engine;
-	}
-	catch(const std::exception& e) {
-		SystemUtil::handleException(e);
-		delete engine;
-	}
-
-	return 0;
-}
-</code></pre>
-
-Add 'include' to C/C++/Additional Include Directories.
-Add 'PolyMain.lib' to Linker/Input/Additional Dependencies.
-Under general, set output dir to 'bin\' and intermediate dir to 'obj\'.
-You should now be able to compile the project.
-(Don't forget to set the project configuration from debug to release).
-
-Running the generated cargo.exe will lead to an error. You need to copy all the requested dlls into
-the bin directory.
-
-1.2 Startup
------------
-engine = new Engine("game.cfg");
-engine->initialise();
-
-//// TODO push your GameState here, the next call will be blocking
-
-engine->run();
-</code></pre>
-
-Loading a configuration:
-<pre><code>ConfigurationManager* configMgr = new ConfigurationManager();
-configMgr->load("game.cfg");
-
-engine = new Engine(configMgr); // You need to pass your instance here, else the engine will use its own
-</code></pre>
-
-Note: The ConfigurationManager may be created before the engine in order to set options in code
-		rather than loading them from the configuration file.
-
-1.3 Creating/Manipulating a Entity
------------
-Registering GameObject type (optional):
-<pre><code>StringVector components;
-components.push_back("Transform");
-components.push_back("Mesh");
-
-PropertyMap params;
-params["Transform/Scale"] = Vector3::UNIT_SCALE * 0.4f;
-params["Mesh/Name"] = "crate.mesh";
-params["Mesh/MaterialName"] = "Material/Crate";
-
-gameObjectMgr->registerGameObjectType("Crate", components, params);
-</code></pre>
-
-Creation:
-<pre><code>GameObject crate;
-
-Scene scene = sceneMgr->createScene();
-
-PropertyMap params;
-params["Transform/Position"] = Vector3(0, 10, 0);
-
-crate = gameObjectMgr->createGameObject(scene, "Crate", params);
-</code></pre>
-
-Manipulation:
-<pre><code>TransformComponent* tfComponent = crate.getComponent<TransformComponent>();
-tfComponent->setPosition(Vector3::ZERO);
-</code></pre>
-
-Note: The GameObject is simply an abstraction for the inner working of this system. You may
-use it like any other object BUT never use a pointer or a reference* to it. Just pass it by value.
-
-(* The GameObject class does only contain an ushort, nothing more. Passing by reference would be a
-waste of resources.)
-
-
-2. GameObjects
-==============
-GameObjects are the core essence of a game. A GameObject contains Components which define its
-behavior. **Do not inherit from GameObject!**
-
-How to create a simple Component which does only contain data:
-<pre><code>class HealthComponent : public IComponent {
-public:
-						HealthComponent(GameObject gameObject, const PropertyMap& params);
-
-	void				setHealth(short health);
-	short				getHealth() const;
-	bool				isDead() const;
-
-	//// Component info
-	static String		getTypeNameStatic() { return "Health"; }
-	static String		getFamilyNameStatic() { return "Health"; }
-	static float		getPriorityStatic() { return 5.0f; }
-
-protected:
-	//// Current health.
-	short mHealth;
-};
-
-POLY_INLINE HealthComponent::HealthComponent(GameObject gameObject, const PropertyMap& params)
-:	IComponent(gameObject, params) {
-}
-POLY_INLINE void HealthComponent::setHealth(short health) {
-	mHealth = health;
-}
-POLY_INLINE short HealthComponent::getHealth() const {
-	return mHealth;
-}
-POLY_INLINE bool HealthComponent::isDead() const {
-	return mHealth <= 0;
-}
-</code></pre>
-
-Now, how to add this component to your GameObject?
-<pre><code>componentMgr->registerComponentType<HealthComponent>();
-
-StringVector components;
-components.push_back("Health");
-
-gameObjectMgr->registerGameObjectType("Player", components);
-</code></pre>
-
-The component has 3 static member functions. The first two, **getTypeNameStatic** and **getFamilyNameStatic**,
-provide its type name and its family name. When creating a new GameObject type you use the type name 
-of a component, because it's specific to this exact component class. The family name is used when 
-you access a GameObjects components:
-<pre><code>GameObject create; create.getComponent<HealthComponent>();</code></pre>
-In case you want a health behavior which does loose health over time, you would inherit HealthComponent
-and add your code to the update function (see ITask). Then you add FadingHealthComponent to the
-componentMgr. The type name will be "FadingHealthComponent", but the family name should be
-"HealthComponent" because this component does represent the same piece of data. When you add
-"FadingHealthComponent" then later to your GameObject, the code accessing it with
-getComponent<HealthComponent>(); will still work because both components got the same family name.
-The last static function **getPriorityStatic** is used to sort the Components of a GameObject
-before creation, to resolve dependencies.
-
-
-3. Architecture
-===============
-The architecture currently consists of 4 tiers:
-- Utility
-- Core
-- Systems (Audio, Input, Network, Physics, Rendering, ...)
-- Game
-
-This structure guarantees a modular architecture. The lower tiers may never access anything from
-higher tiers.
-
-**Tier 0 (Utility)** provides the most basic services, mostly single functions. This tier abstracts 
-the platform. Functions provided: Hashing, random data, sleeping, callstack, exception handling.
-
-**Tier 1 (Core)** contains the very essential elements which hold the higher tiers together.
-Engine startup/shutdown and the mainloop resides here.
-
-**Tier 2 (Systems)** are mostly virtual interfaces  and the specific code in detached
-into an extension library. 
-
-**Tier 3 (Game)** contains the GameObject, Component managers and scene loading. Basis for gameplay.
-
-
-4. Design
-=========
-- Use 3ds Max, Maya, ... for model creation (level, characters, props) and provide exporters/importers
-- Support rapid prototyping (hot swap of models, code, ...)
-
-
-5. Terminology
-==============
-
-- Entity: A bag of components
-- Component: Value container for entities, contain no logic
-- System: Implement the Entity logic
-- Task: A small task updated during gameplay
-
-*/

PolyMain/include/PolyPrerequisites.h

 	class EntityManager;
 	class EntityLogic;
 	class GameStateManager;
-	class SaveLoadManager;
 	class SceneManager;
 	class LevelManager;
 	class EventHub;

PolyMain/include/core/PolyCore.h

 #include "PolyEngine.h"
 #include "PolyTaskManager.h"
 #include "PolyResourceManager.h"
-#include "PolySaveLoadManager.h"
 
 /** @} */
 

PolyMain/include/core/PolyEngine.cpp

 #include "PolyResourceManager.h"
 #include "PolyTaskManager.h"
 #include "PolyConfigurationManager.h"
-#include "PolySaveLoadManager.h"
 #include "PolySystemFactory.h"
 #include "PolyDynLib.h"
 #include "PolyEventHub.h"
 		delete gEnv.globalEventHub.get(); gEnv.globalEventHub.reset();
 		POLY_LOG_TRIVIAL("sceneMgr");
 		delete gEnv.sceneMgr.get(); gEnv.sceneMgr.reset();
-		POLY_LOG_TRIVIAL("saveLoadMgr");
-		delete gEnv.saveLoadMgr.get(); gEnv.saveLoadMgr.reset();
 		POLY_LOG_TRIVIAL("gameStateMgr");
 		delete gEnv.gameStateMgr.get(); gEnv.gameStateMgr.reset();
 		POLY_LOG_TRIVIAL("entityMgr");
 		gEnv.componentMgr.set(new ComponentManager());
 		gEnv.entityMgr.set(new EntityManager());
 		gEnv.gameStateMgr.set(new GameStateManager());
-		gEnv.saveLoadMgr.set(new SaveLoadManager());
 		gEnv.sceneMgr.set(new SceneManager());
 		gEnv.globalEventHub.set(new EventHub());
 		

PolyMain/include/core/PolySaveLoadListener.h

-/*
-    Copyright (c) Oliver 'SirPolly' Weitzel
-                                                                                  
-    Permission is hereby granted, free of charge, to any person obtaining a copy
-    of this software and associated documentation files (the "Software"), to deal
-    in the Software without restriction, including without limitation the rights
-    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-    copies of the Software, and to permit persons to whom the Software is
-    furnished to do so, subject to the following conditions:
-                                                                                  
-    The above copyright notice and this permission notice shall be included in
-    all copies or substantial portions of the Software.
-                                                                                  
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-    THE SOFTWARE. 
-    
-*/
-
-#ifndef PolySaveLoadListener_h
-#define PolySaveLoadListener_h
-
-namespace Poly {
-	class ISaveLoadListener {
-	public:
-		virtual ~ISaveLoadListener() {}
-	};
-}
-
-#endif

PolyMain/include/core/PolySaveLoadManager.cpp

-/*
-    Copyright (c) Oliver 'SirPolly' Weitzel
-                                                                                  
-    Permission is hereby granted, free of charge, to any person obtaining a copy
-    of this software and associated documentation files (the "Software"), to deal
-    in the Software without restriction, including without limitation the rights
-    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-    copies of the Software, and to permit persons to whom the Software is
-    furnished to do so, subject to the following conditions:
-                                                                                  
-    The above copyright notice and this permission notice shall be included in
-    all copies or substantial portions of the Software.
-                                                                                  
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-    THE SOFTWARE. 
-    
-*/
-
-#include "PolyPrerequisites.h"
-#include "core/PolyEngine.h"
-#include "core/PolyResourceManager.h"
-#include "game/PolyEntityManager.h"
-#include "game/PolyGameStateManager.h"
-
-#include "core/PolySaveLoadManager.h"
-
-namespace Poly {
-	SaveLoadManager::SaveLoadManager() {
-	}
-
-	void SaveLoadManager::save(const String& fileName) {
-		POLY_LOG("Saving game...");
-
-		BitStream bs;
-		gEnv.entityMgr->save(bs);
-		gEnv.gameStateMgr->save(bs);
-
-		Ogre::DataStreamPtr stream = gEnv.resourceMgr->createResource(fileName, "SaveLoad", true);
-		if(stream.isNull()) {
-			POLY_LOG_CRITICAL("Failed to save game!");
-			return;
-		}
-
-		if(bs.getLength() > 0) {
-			stream->write(bs.getData(), bs.getLength());
-		}
-
-		stream->close();
-	}
-
-	void SaveLoadManager::load(const String& fileName) {
-		POLY_LOG("Loading game...");
-		
-		Ogre::DataStreamPtr stream = gEnv.resourceMgr->openResource(fileName, "SaveLoad");
-		if(stream.isNull()) {
-			POLY_LOG("Failed to load game!");
-			return;
-		}
-		
-		char* buffer = new char[stream->size()];
-		stream->read(buffer, stream->size());
-
-		BitStream bs(buffer, stream->size(), false);
-		gEnv.entityMgr->load(bs);
-		gEnv.gameStateMgr->load(bs);
-
-		delete[] buffer;
-	}
-}

PolyMain/include/core/PolySaveLoadManager.h

-/*
-    Copyright (c) Oliver 'SirPolly' Weitzel
-                                                                                  
-    Permission is hereby granted, free of charge, to any person obtaining a copy
-    of this software and associated documentation files (the "Software"), to deal
-    in the Software without restriction, including without limitation the rights
-    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-    copies of the Software, and to permit persons to whom the Software is
-    furnished to do so, subject to the following conditions:
-                                                                                  
-    The above copyright notice and this permission notice shall be included in
-    all copies or substantial portions of the Software.
-                                                                                  
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-    THE SOFTWARE. 
-    
-*/
-
-#ifndef PolySaveLoadManager_h
-#define PolySaveLoadManager_h
-
-namespace Poly {
-	/**
-	@ingroup Core
-	*/
-	class _PolyExport SaveLoadManager {
-	public:
-				SaveLoadManager();
-
-		void	save(const String& fileName);
-		void	load(const String& fileName);
-
-	private:
-	};
-}
-
-#endif

PolyMain/include/game/PolyEntity.h

 		/** Get Component by family name.
 		*/
 		template<typename ComponentType>
-		ComponentType*				getComponent() const;
+		ComponentType*				getComponent(bool _throw=false) const;
 
 		const TypeNameComponentMap&	getComponents() const;
 
 	}
 
 	template<typename ComponentType>
-	ComponentType* Entity::getComponent() const {
+	ComponentType* Entity::getComponent(bool _throw) const {
 		POLY_ASSERT(mEID != UNASSIGNED_ENTITY_ID);
 
 		TypeNameComponentMap& components = msComponentsByFamily[mEID];
 			// TODO don't want a dynamic_cast here, too slow.
 			return dynamic_cast<ComponentType*>(itr->second);
 		}
+		else if(_throw) {
+			POLY_EXCEPT(Exception::ERR_ITEM_NOT_FOUND,
+				"Component '" + familyName.get() + "' not found in Entity!",
+				"Entity::getComponent");
+		}
 
 		return POLY_NULLPTR;
 	}

PolyMain/include/game/PolyEntityManager.cpp

 			logic->entityTypeRegistered(typeName);
 	}
 
-	void EntityManager::save(IStream& bs) const {
-// 		// Collect Entities to serialize
-// 		EntityList entitiesToSerialize;
-// 
-// 		for(EntityList::const_iterator itr = mEntities.begin(); itr != mEntities.end(); ++itr) {
-// 			Entity entity = *itr;
-// 
-// 			if(!entity.hasTag(DONT_SERIALIZE_TAG))
-// 				entitiesToSerialize.push_back(entity);
-// 		}
-// 
-// 		// Write
-// 		bs.write((uint)entitiesToSerialize.size());
-// 
-// 		POLY_LOG("Saving " << entitiesToSerialize.size() << " Entities to archive...");
-// 
-// 		for(EntityList::const_iterator itr = entitiesToSerialize.begin(); itr != entitiesToSerialize.end(); ++itr) {
-// 			Entity entity = *itr;
-// 			entity.save(bs);
-// 		}
-	}
-
-	void EntityManager::load(IStream& bs) {
-// 		uint count = 0;
-// 		bs.read(count);
-// 
-// 		POLY_LOG("Loading " << count << " Entities from archive...");
-// 
-// 		for(uint i = 0; i < count; ++i) {
-// 			//GameObject gameObject = createGameObject();
-// 			//gameObject.load(bs);
-// 		}
-	}
-
 	Ogre::ScriptTranslator* EntityManager::getTranslator(const Ogre::AbstractNodePtr& node){
 		Ogre::ScriptTranslator* translator = 0;
 		if(node->type == Ogre::ANT_OBJECT) {

PolyMain/include/game/PolyEntityManager.h

 #define PolyEntityManager_h
 
 #include "core/PolyEngineListener.h"
-#include "core/PolySaveLoadListener.h"
 #include "PolyEntity.h"
 #include "PolyEntityTemplate.h"
 #include "PolyEntityTemplateTranslator.h"
 	*/
 	class _PolyExport EntityManager
 	:	public IEngineListener,
-		public ISaveLoadListener,
 		public Ogre::ScriptTranslatorManager {
 	public:
 							EntityManager();
 
 		virtual uint		getUpdateBitMask() const;
 
-		// Serialization
-		void				save(IStream& bs) const;
-		void				load(IStream& bs);
-
 		size_t				getNumTranslators() const { return 1; }
 
 		Ogre::ScriptTranslator* getTranslator(const Ogre::AbstractNodePtr& node);

PolyMain/include/game/PolyPhysicsEntityLogic.cpp

 #include "PolyEntity.h"
 #include "PolyTransformComponent.h"
 #include "PolyPhysicsDynamicComponent.h"
+#include "PolyPhysicsStaticComponent.h"
+#include "physics/PolyPhysicsSystem.h"
 
 #include "PolyPhysicsEntityLogic.h"
 
 	void PhysicsEntityLogic::updateEntitiesOfInterest(const String& typeName, const EntityList& entities) {
 		BOOST_FOREACH(Entity entity, entities) {
 			TransformComponent* transformC = entity.getComponent<TransformComponent>();
-			PhysicsDynamicComponent* physicsC = entity.getComponent<PhysicsDynamicComponent>();
-			if(transformC && physicsC) {
-				if(!physicsC->isKinematic()) {
-					Vector3 position = physicsC->getPosition();
-					Quaternion orientation = physicsC->getOrientation();
+			
+			if(transformC) {
+				// Update dynamic components
+				PhysicsDynamicComponent* dynamicC = entity.getComponent<PhysicsDynamicComponent>();
+				if(dynamicC) {
+					if(!dynamicC->isKinematic()) {
+						Vector3 position = dynamicC->getPosition();
+						Quaternion orientation = dynamicC->getOrientation();
 
-					SceneNode* sn = transformC->getSceneNode();
-					sn->setPosition(position);
-					sn->setOrientation(orientation);
+						SceneNode* sn = transformC->getSceneNode();
+						sn->setPosition(position);
+						sn->setOrientation(orientation);
+					}
+					else {
+						SceneNode* sn = transformC->getSceneNode();
+						Vector3 position = sn->getPosition();
+						Quaternion orientation = sn->getOrientation();
+
+						dynamicC->setPosition(position);
+						dynamicC->setOrientation(orientation);
+					}
 				}
-				else {
-					SceneNode* sn = transformC->getSceneNode();
-					Vector3 position = sn->getPosition();
-					Quaternion orientation = sn->getOrientation();
+				
+				// Update static components
+				PhysicsStaticComponent* staticC = entity.getComponent<PhysicsStaticComponent>();
+				if(staticC) {
+					physx::PxTransform transform = staticC->rigidStatic->getGlobalPose();
 
-					physicsC->setPosition(position);
-					physicsC->setOrientation(orientation);
+					Vector3 transformCPosition = transformC->getSceneNode()->_getDerivedPosition();
+					Quaternion transformCOrientation = transformC->getSceneNode()->_getDerivedOrientation();
+					bool transformMoved = transformCPosition.squaredDistance(PhysicsUtil::convert(transform.p)) > 1.0f;
+					if(transformMoved) {
+						gEnv.physics->removeRigidBodyFromScene(entity.getScene(), staticC->rigidStatic);
+
+						transform.p = PhysicsUtil::convert(transformCPosition);
+						transform.q = PhysicsUtil::convert(transformCOrientation);
+						staticC->rigidStatic->setGlobalPose(transform);
+
+						gEnv.physics->addRigidBodyToScene(entity.getScene(), staticC->rigidStatic);
+					}
 				}
 			}
 		}