disable querying of local entities with a component. Avoids OOS problems. Patch thanks to historicbruno. Fixes #2119

This was SVN commit r13820.
This commit is contained in:
sanderd17
2013-09-10 12:27:59 +00:00
parent d51217f718
commit d037d97d55
@@ -358,7 +358,8 @@ std::vector<int> CComponentManager::Script_GetEntitiesWithInterface(void* cbdata
std::vector<int> 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;
}