From def622a02c01dc15e5f8f68a3458f4f6de27cc83 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 12 Jan 2025 17:03:18 +0100 Subject: [PATCH] #CTLD - InjectTroops - if precision coords is true, do also not randomize unit positions. --- Moose Development/Moose/Ops/CTLD.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index 73d870cc3..26295b17a 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -1352,7 +1352,7 @@ CTLD.UnitTypeCapabilities = { --- CTLD class version. -- @field #string version -CTLD.version="1.1.22" +CTLD.version="1.1.23" --- Instantiate a new CTLD. -- @param #CTLD self @@ -5583,11 +5583,12 @@ end if PreciseLocation then randomcoord = zone:GetCoordinate():GetVec2() end + local randompositions = not PreciseLocation for _,_template in pairs(temptable) do self.TroopCounter = self.TroopCounter + 1 local alias = string.format("%s-%d", _template, math.random(1,100000)) self.DroppedTroops[self.TroopCounter] = SPAWN:NewWithAlias(_template,alias) - :InitRandomizeUnits(true,20,2) + :InitRandomizeUnits(randompositions,20,2) :InitDelayOff() :SpawnFromVec2(randomcoord) if self.movetroopstowpzone and type ~= CTLD_CARGO.Enum.ENGINEERS then