Ykkrosh
65bcedb9fc
Add basic hold-fire stance, and use it for some test maps. Add JSON data container to map XML files, to simplify the interaction between scripts and maps. Fix fixed-point printing so it roundtrips safely through map files. Fix camera startup positions in old-format maps. This was SVN commit r7844.
18 lines
385 B
JavaScript
18 lines
385 B
JavaScript
function LoadMapSettings(settings)
|
|
{
|
|
// Default settings for old maps
|
|
if (!settings)
|
|
settings = {};
|
|
|
|
if (settings.DefaultStance)
|
|
{
|
|
for each (var ent in Engine.GetEntitiesWithInterface(IID_UnitAI))
|
|
{
|
|
var cmpUnitAI = Engine.QueryInterface(ent, IID_UnitAI);
|
|
cmpUnitAI.SetStance(settings.DefaultStance);
|
|
}
|
|
}
|
|
}
|
|
|
|
Engine.RegisterGlobal("LoadMapSettings", LoadMapSettings);
|