Fix unit demo map
Split from D4589 Differential revision: D4600 Original patch by: @Langbart Fixes: #6486 Refs: #6116 This was SVN commit r26775.
This commit is contained in:
parent
8a51e05c2e
commit
eafdb2339d
@ -12,7 +12,7 @@ let startZ = 20;
|
||||
/**
|
||||
* Horizontal coordinate of the last entity in the current row.
|
||||
*/
|
||||
let stopX = 1580;
|
||||
let stopX = 1870;
|
||||
|
||||
/**
|
||||
* Coordinates of the current entity.
|
||||
@ -64,6 +64,12 @@ for (let template of cmpTemplateManager.FindAllTemplates(actors))
|
||||
maxh = 0;
|
||||
}
|
||||
|
||||
if (z >= stopX)
|
||||
{
|
||||
error(template + " would be placed out of map [" +(x + w / 2) + ", " + z + "]");
|
||||
continue;
|
||||
}
|
||||
|
||||
let cmpPosition = Engine.QueryInterface(ent, IID_Position);
|
||||
if (!cmpPosition)
|
||||
{
|
||||
@ -72,7 +78,7 @@ for (let template of cmpTemplateManager.FindAllTemplates(actors))
|
||||
continue;
|
||||
}
|
||||
|
||||
cmpPosition.MoveTo(x + w / 2, z);
|
||||
cmpPosition.JumpTo(x + w / 2, z);
|
||||
cmpPosition.SetYRotation(Math.PI * 3 / 4);
|
||||
|
||||
let cmpOwnership = Engine.QueryInterface(ent, IID_Ownership);
|
||||
|
BIN
binaries/data/mods/public/maps/scenarios/units_demo.xml
(Stored with Git LFS)
BIN
binaries/data/mods/public/maps/scenarios/units_demo.xml
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user