mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user