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