mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#CTLD - InjectTroops - if precision coords is true, do also not randomize unit positions.
This commit is contained in:
parent
30bedb39f1
commit
def622a02c
@ -1352,7 +1352,7 @@ CTLD.UnitTypeCapabilities = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.1.22"
|
CTLD.version="1.1.23"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -5583,11 +5583,12 @@ end
|
|||||||
if PreciseLocation then
|
if PreciseLocation then
|
||||||
randomcoord = zone:GetCoordinate():GetVec2()
|
randomcoord = zone:GetCoordinate():GetVec2()
|
||||||
end
|
end
|
||||||
|
local randompositions = not PreciseLocation
|
||||||
for _,_template in pairs(temptable) do
|
for _,_template in pairs(temptable) do
|
||||||
self.TroopCounter = self.TroopCounter + 1
|
self.TroopCounter = self.TroopCounter + 1
|
||||||
local alias = string.format("%s-%d", _template, math.random(1,100000))
|
local alias = string.format("%s-%d", _template, math.random(1,100000))
|
||||||
self.DroppedTroops[self.TroopCounter] = SPAWN:NewWithAlias(_template,alias)
|
self.DroppedTroops[self.TroopCounter] = SPAWN:NewWithAlias(_template,alias)
|
||||||
:InitRandomizeUnits(true,20,2)
|
:InitRandomizeUnits(randompositions,20,2)
|
||||||
:InitDelayOff()
|
:InitDelayOff()
|
||||||
:SpawnFromVec2(randomcoord)
|
:SpawnFromVec2(randomcoord)
|
||||||
if self.movetroopstowpzone and type ~= CTLD_CARGO.Enum.ENGINEERS then
|
if self.movetroopstowpzone and type ~= CTLD_CARGO.Enum.ENGINEERS then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user