Ykkrosh
dd501b2a5a
Support direct access to serializer streams, so serializers can be nested. Make component script "this.template" read-only. Stop globally-subscribed component scripts receiving messages posted to local components, to reduce out-of-sync risks. Move pathfinder data out of entity template directory. Fix GuiInterface deserialization. This was SVN commit r8865.
15 lines
379 B
JavaScript
15 lines
379 B
JavaScript
function InitGame(settings)
|
|
{
|
|
// This will be called after the map settings have been loaded,
|
|
// before the simulation has started.
|
|
|
|
var cmpAIManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_AIManager);
|
|
for (var i = 0; i < settings.AIs.length; ++i)
|
|
{
|
|
if (settings.AIs[i])
|
|
cmpAIManager.AddPlayer(settings.AIs[i], i);
|
|
}
|
|
}
|
|
|
|
Engine.RegisterGlobal("InitGame", InitGame);
|