From d037d97d55393213ae825b3a6401d0b8429ab087 Mon Sep 17 00:00:00 2001 From: sanderd17 Date: Tue, 10 Sep 2013 12:27:59 +0000 Subject: [PATCH] disable querying of local entities with a component. Avoids OOS problems. Patch thanks to historicbruno. Fixes #2119 This was SVN commit r13820. --- source/simulation2/system/ComponentManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp index 5f85a65038..3200378a67 100644 --- a/source/simulation2/system/ComponentManager.cpp +++ b/source/simulation2/system/ComponentManager.cpp @@ -358,7 +358,8 @@ std::vector CComponentManager::Script_GetEntitiesWithInterface(void* cbdata std::vector ret; const InterfaceListUnordered& ents = componentManager->GetEntitiesWithInterfaceUnordered(iid); for (InterfaceListUnordered::const_iterator it = ents.begin(); it != ents.end(); ++it) - ret.push_back(it->first); // TODO: maybe we should exclude local entities + if (!ENTITY_IS_LOCAL(it->first)) + ret.push_back(it->first); std::sort(ret.begin(), ret.end()); return ret; }