Merge branch 'MemoryOptimization' into Importer

# Conflicts:
#	include/Engine/Rendering/Model.h
#	src/Engine/Collision/Collision.cpp
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Collision/TriggerSystem.cpp
#	src/Game/Systems/SpawnerSystem.cpp
This commit is contained in:
William Moberg
2016-03-14 02:06:53 +01:00
17 changed files with 91 additions and 89 deletions
+4 -4
View File
@@ -112,16 +112,16 @@ bool SpawnerSystem::spawnedEntityIsColliding(EntityWrapper spawnedEntity, Entity
if (!spawnedBox.Entity.HasComponent("Model")) {
return true;
}
RawModel* model = nullptr;
Model* model = nullptr;
try {
model = ResourceManager::Load<RawModel, true>(otherEntity["Model"]["Resource"]);
model = ResourceManager::Load<Model, true>(otherEntity["Model"]["Resource"]);
} catch (const std::exception&) {
}
if (model != nullptr && Collision::AABBvsTriangles(
spawnedBox,
model->CollisionVertices(),
model->CollisionIndices(),
model->m_Vertices,
model->m_Indices,
TransformSystem::ModelMatrix(otherEntity))) {
return true;
}