Merge remote-tracking branch 'origin/master' into gui

Conflicts:
	src/GameWorld.cpp
	src/Systems/FreeSteeringSystem.cpp
	src/Systems/PhysicsSystem.cpp
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
2014-05-06 18:05:31 +02:00
24 changed files with 1205 additions and 128 deletions
+10 -1
View File
@@ -143,7 +143,16 @@ std::shared_ptr<T> World::AddComponent(EntityID entity, std::string componentTyp
template <class T>
T* World::GetComponent(EntityID entity, std::string componentType)
{
return (T*)m_EntityComponents[entity][componentType].get();
auto components = m_EntityComponents[entity];
auto it = components.find(componentType);
if (it != components.end())
{
return static_cast<T*>(it->second.get());
}
else
{
return nullptr;
}
}
#endif // World_h__