forked from 0ad/0ad
Yves
3362c591f5
This avoids wrapping overhead that would otherwise be required because multiple globals per compartment aren't supported anymore in newer versions of SpiderMonkey. Check the ticket for a detailed explanation. Closes #2322 Refs #2241 Refs #1886 This was SVN commit r14441.
17 lines
331 B
JavaScript
17 lines
331 B
JavaScript
var AEGIS = function(m)
|
|
{
|
|
|
|
m.EntityCollectionFromIds = function(gameState, idList){
|
|
var ents = {};
|
|
for (var i in idList){
|
|
var id = idList[i];
|
|
if (gameState.entities._entities[id]) {
|
|
ents[id] = gameState.entities._entities[id];
|
|
}
|
|
}
|
|
return new API3.EntityCollection(gameState.sharedScript, ents);
|
|
}
|
|
|
|
return m;
|
|
}(AEGIS);
|