Update Scene.cpp
Fixed a bug where EntityListContains could fail.
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
#include <algorithm>
|
||||
|
||||
bool Engine::Scene::EntityListContains(const Entity* entity) const {
|
||||
for (auto* e : entity_list)
|
||||
auto flat = GetFlatEntityList(entity_list);
|
||||
|
||||
for (auto* e : flat)
|
||||
if (e == entity)
|
||||
return true;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user