From 39e3f8b646700c8c351889735945655dba2d4a16 Mon Sep 17 00:00:00 2001 From: smiki Date: Wed, 28 Jan 2026 11:56:09 +0100 Subject: [PATCH 01/12] [FIX] Memory leak caused by continuous F10 redrawing that for marker (add, remove) which creates new coordinate. --- Moose Development/Moose/Core/Event.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 87847f95a..23c1733e9 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -1519,7 +1519,6 @@ function EVENT:onEvent( Event ) if Event.idx then Event.MarkID=Event.idx Event.MarkVec3=Event.pos - Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) Event.MarkText=Event.text Event.MarkCoalition=Event.coalition Event.IniCoalition=Event.coalition From ae156259c047d9fdee7738f68a6488457797c761 Mon Sep 17 00:00:00 2001 From: smiki Date: Wed, 28 Jan 2026 12:01:53 +0100 Subject: [PATCH 02/12] [FIX] Memory leak caused by players bombing neighborhoods and creating hundreds of Dead events for scenery that registers their objects. --- Moose Development/Moose/Core/Event.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 23c1733e9..65ee73826 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -184,6 +184,7 @@ EVENT = { ClassName = "EVENT", ClassID = 0, MissionEnd = false, + RegisterSceneryOnEvent = true, } world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000 @@ -1374,7 +1375,9 @@ function EVENT:onEvent( Event ) Event.IniDCSUnit = Event.initiator Event.IniDCSUnitName = ( Event.IniDCSUnit and Event.IniDCSUnit.getName ) and Event.IniDCSUnit:getName() or "Scenery no name "..math.random(1,20000) Event.IniUnitName = Event.IniDCSUnitName - Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator ) + if self.RegisterSceneryOnEvent then + Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator ) + end Event.IniCategory = (Event.IniDCSUnit and Event.IniDCSUnit.getDesc ) and Event.IniDCSUnit:getDesc().category Event.IniTypeName = (Event.initiator and Event.initiator.isExist and Event.initiator:isExist() and Event.IniDCSUnit and Event.IniDCSUnit.getTypeName) and Event.IniDCSUnit:getTypeName() or "SCENERY" @@ -1478,7 +1481,9 @@ function EVENT:onEvent( Event ) Event.TgtDCSUnitName = Event.TgtDCSUnit.getName and Event.TgtDCSUnit:getName() or nil if Event.TgtDCSUnitName~=nil then Event.TgtUnitName = Event.TgtDCSUnitName - Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target ) + if self.RegisterSceneryOnEvent then + Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target ) + end Event.TgtCategory = Event.TgtDCSUnit:getDesc().category Event.TgtTypeName = Event.TgtDCSUnit:getTypeName() end From 80f2a0ef39fd9c6462080e21e8d68c355e9dba7a Mon Sep 17 00:00:00 2001 From: smiki Date: Wed, 28 Jan 2026 12:05:32 +0100 Subject: [PATCH 03/12] [FIX] Memory leak caused by continuous F10 redrawing that for marker (add, remove) which creates new coordinate. --- Moose Development/Moose/Core/Event.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 65ee73826..652360a2f 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -185,6 +185,7 @@ EVENT = { ClassID = 0, MissionEnd = false, RegisterSceneryOnEvent = true, + CreateMarkCoordinates = true, } world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000 @@ -1524,6 +1525,9 @@ function EVENT:onEvent( Event ) if Event.idx then Event.MarkID=Event.idx Event.MarkVec3=Event.pos + if self.CreateMarkCoordinates then + Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) + end Event.MarkText=Event.text Event.MarkCoalition=Event.coalition Event.IniCoalition=Event.coalition From 1e200511cb8409e9da13540c162cda3371504427 Mon Sep 17 00:00:00 2001 From: smiki Date: Wed, 28 Jan 2026 12:06:11 +0100 Subject: [PATCH 04/12] [FIX] Memory leak caused by continuous F10 redrawing that for marker (add, remove) which creates new coordinate. --- Moose Development/Moose/Core/Event.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 652360a2f..003a7195e 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -185,7 +185,7 @@ EVENT = { ClassID = 0, MissionEnd = false, RegisterSceneryOnEvent = true, - CreateMarkCoordinates = true, + CreateMarkCoordinateOnEvent = true, } world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000 @@ -1525,7 +1525,7 @@ function EVENT:onEvent( Event ) if Event.idx then Event.MarkID=Event.idx Event.MarkVec3=Event.pos - if self.CreateMarkCoordinates then + if self.CreateMarkCoordinateOnEvent then Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) end Event.MarkText=Event.text From f20c22ab49a807509ee9f72db409a65f856ea2b8 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 28 Jan 2026 14:41:51 +0100 Subject: [PATCH 05/12] #EVENT - Save some memory by avoiding to register SCENERY yet unregistered and avoiding creating COORDINATEs on Marks (still has a Vec3) when not switched on --- Moose Development/Moose/Core/Event.lua | 46 +++++++------------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 87847f95a..9b3d96f15 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -184,6 +184,7 @@ EVENT = { ClassName = "EVENT", ClassID = 0, MissionEnd = false, + CreateMarkCoordinateOnEvent = false, } world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000 @@ -1063,36 +1064,6 @@ end do -- Event Creation - --- Creation of a New Cargo Event. - -- @param #EVENT self - -- @param AI.AI_Cargo#AI_CARGO Cargo The Cargo created. - function EVENT:CreateEventNewCargo( Cargo ) - self:F( { Cargo } ) - - local Event = { - id = EVENTS.NewCargo, - time = timer.getTime(), - cargo = Cargo, - } - - world.onEvent( Event ) - end - - --- Creation of a Cargo Deletion Event. - -- @param #EVENT self - -- @param AI.AI_Cargo#AI_CARGO Cargo The Cargo created. - function EVENT:CreateEventDeleteCargo( Cargo ) - self:F( { Cargo } ) - - local Event = { - id = EVENTS.DeleteCargo, - time = timer.getTime(), - cargo = Cargo, - } - - world.onEvent( Event ) - end - --- Creation of a New Zone Event. -- @param #EVENT self -- @param Core.Zone#ZONE_BASE Zone The Zone created. @@ -1361,7 +1332,8 @@ function EVENT:onEvent( Event ) Event.IniDynamicCargoName = Event.IniUnitName Event.IniPlayerName = string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+") else - Event.IniUnit = CARGO:FindByName( Event.IniDCSUnitName ) + --Event.IniUnit = CARGO:FindByName( Event.IniDCSUnitName ) + Event.IniUnit = STATIC:FindByName( Event.IniDCSUnitName, false ) end Event.IniCoalition = Event.IniDCSUnit:getCoalition() Event.IniCategory = Event.IniDCSUnit:getDesc().category @@ -1374,7 +1346,9 @@ function EVENT:onEvent( Event ) Event.IniDCSUnit = Event.initiator Event.IniDCSUnitName = ( Event.IniDCSUnit and Event.IniDCSUnit.getName ) and Event.IniDCSUnit:getName() or "Scenery no name "..math.random(1,20000) Event.IniUnitName = Event.IniDCSUnitName - Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator ) + local ID = (Event.IniDCSUnit and Event.IniDCSUnit.getID) and Event.IniDCSUnit:getID() or Event.IniDCSUnitName + Event.IniUnit = (_SCENERY ~= nil) and _SCENERY[ID] or nil + --Event.IniUnit = SCENERY:Register( Event.IniDCSUnitName, Event.initiator ) Event.IniCategory = (Event.IniDCSUnit and Event.IniDCSUnit.getDesc ) and Event.IniDCSUnit:getDesc().category Event.IniTypeName = (Event.initiator and Event.initiator.isExist and Event.initiator:isExist() and Event.IniDCSUnit and Event.IniDCSUnit.getTypeName) and Event.IniDCSUnit:getTypeName() or "SCENERY" @@ -1478,7 +1452,9 @@ function EVENT:onEvent( Event ) Event.TgtDCSUnitName = Event.TgtDCSUnit.getName and Event.TgtDCSUnit:getName() or nil if Event.TgtDCSUnitName~=nil then Event.TgtUnitName = Event.TgtDCSUnitName - Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target ) + local ID = (Event.TgtDCSUnit and Event.TgtDCSUnit.getID) and Event.TgtDCSUnit:getID() or Event.TgtDCSUnitName + --Event.TgtUnit = SCENERY:Register( Event.TgtDCSUnitName, Event.target ) + Event.TgtUnit = (_SCENERY ~= nil) and _SCENERY[ID] or nil Event.TgtCategory = Event.TgtDCSUnit:getDesc().category Event.TgtTypeName = Event.TgtDCSUnit:getTypeName() end @@ -1519,7 +1495,9 @@ function EVENT:onEvent( Event ) if Event.idx then Event.MarkID=Event.idx Event.MarkVec3=Event.pos - Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) + if self.CreateMarkCoordinateOnEvent == true then + Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos) + end Event.MarkText=Event.text Event.MarkCoalition=Event.coalition Event.IniCoalition=Event.coalition From c2c957b859cf344aa8e6335f9aa674a259cc7f7e Mon Sep 17 00:00:00 2001 From: smiki Date: Thu, 29 Jan 2026 18:32:04 +0100 Subject: [PATCH 06/12] [FIX] Added Alias to COMMANDER init from CHIEF --- Moose Development/Moose/Ops/Chief.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index 9500ae313..fb5d15ed7 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -396,7 +396,7 @@ function CHIEF:New(Coalition, AgentSet, Alias) self.TransportCategories = {Group.Category.HELICOPTER} -- Create a new COMMANDER. - self.commander=COMMANDER:New(Coalition) + self.commander=COMMANDER:New(Coalition, Alias) -- Add FSM transitions. -- From State --> Event --> To State From 6e12c5c1d0836e6a7c70e45ae2bfbd42a96b13c8 Mon Sep 17 00:00:00 2001 From: smiki Date: Thu, 29 Jan 2026 18:34:37 +0100 Subject: [PATCH 07/12] [FIX] Added Alias to COMMANDER init from CHIEF --- Moose Development/Moose/Ops/Chief.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index fb5d15ed7..a69ad4972 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -398,6 +398,7 @@ function CHIEF:New(Coalition, AgentSet, Alias) -- Create a new COMMANDER. self.commander=COMMANDER:New(Coalition, Alias) + -- Add FSM transitions. -- From State --> Event --> To State self:AddTransition("*", "MissionAssign", "*") -- Assign mission to a COMMANDER. From a699300f5f1413b3870a31fe37e9f77743a3f244 Mon Sep 17 00:00:00 2001 From: smiki Date: Thu, 29 Jan 2026 21:43:27 +0100 Subject: [PATCH 08/12] [ADDED] `COMMANDER:CanMission(Mission)` and `CHIEF:CanMission(Mission)` --- Moose Development/Moose/Ops/Chief.lua | 9 ++++ Moose Development/Moose/Ops/Commander.lua | 64 +++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index a69ad4972..5f33d4a3d 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -3358,6 +3358,15 @@ function CHIEF._CheckAssetProperties(Asset, Properties) return false end + +--- Checks whether or not any of the legions con run a mission. +-- @param #CHIEF self +-- @param Ops.Auftrag#AUFTRAG Mission The mission. +-- @return #boolean If `true`, one of the cohorts can run the mission. +function CHIEF:CanMission(Mission) + return self.commander and self.commander:CanStartMission(Mission) +end + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/Moose Development/Moose/Ops/Commander.lua b/Moose Development/Moose/Ops/Commander.lua index 89a2f50c0..da7d6c9d8 100644 --- a/Moose Development/Moose/Ops/Commander.lua +++ b/Moose Development/Moose/Ops/Commander.lua @@ -1748,6 +1748,70 @@ function COMMANDER:_GetCohorts(Legions, Cohorts, Operation) return cohorts end +--- Checks whether or not any of the legions con run a mission. +-- @param #COMMANDER self +-- @param Ops.Auftrag#AUFTRAG Mission The mission. +-- @return #boolean If `true`, one of the cohorts can run the mission. +function COMMANDER:CanMission(Mission) + local commander = self + + -- Target position. + local TargetVec2 = Mission:GetTargetVec2() + + local MaxWeight = nil + + if Mission.NcarriersMin then + + local legions = commander.legions + local cohorts = nil + if Mission.transportLegions or Mission.transportCohorts then + legions = Mission.transportLegions + cohorts = Mission.transportCohorts + end + + -- Get transport cohorts. + local Cohorts = LEGION._GetCohorts(legions, cohorts) + + -- Filter cohorts that can actually perform transport missions. + local transportcohorts = {} + for _, _cohort in pairs(Cohorts) do + local cohort = _cohort --Ops.Cohort#COHORT + + -- Check if cohort can perform transport to target. + local can = LEGION._CohortCan(cohort, AUFTRAG.Type.OPSTRANSPORT, Mission.carrierCategories, Mission.carrierAttributes, Mission.carrierProperties, nil, TargetVec2) + + -- MaxWeight of cargo assets is limited by the largets available cargo bay. We don't want to select, e.g., tanks that cannot be transported by APCs or helos. + if can and (MaxWeight == nil or cohort.cargobayLimit > MaxWeight) then + MaxWeight = cohort.cargobayLimit + end + end + + end + + local legions = commander.legions + local cohorts = nil + if Mission.specialLegions or Mission.specialCohorts then + legions = Mission.specialLegions + cohorts = Mission.specialCohorts + end + + -- Get cohorts. + local Cohorts = LEGION._GetCohorts(legions, cohorts, Mission.operation, commander.opsqueue) + + for _, _cohort in pairs(Cohorts) do + local cohort = _cohort --Ops.Cohort#COHORT + + -- Check if cohort can do the mission. + local can = LEGION._CohortCan(cohort, Mission.type, nil, Mission.attributes, Mission.properties, { Mission.engageWeaponType }, TargetVec2, Mission.engageRange, Mission.refuelSystem, nil, MaxWeight) + if can then + return true + end + + end + + return false +end + --- Recruit assets for a given mission. -- @param #COMMANDER self -- @param Ops.Auftrag#AUFTRAG Mission The mission. From bd64d084e94d5e9110333acc70000699328c7a0a Mon Sep 17 00:00:00 2001 From: smiki Date: Thu, 5 Feb 2026 10:49:48 +0100 Subject: [PATCH 09/12] Optimizations --- .../Moose/Functional/Autolase.lua | 27 +++++++++---------- Moose Development/Moose/Ops/CTLD.lua | 4 +-- Moose Development/Moose/Ops/Intelligence.lua | 10 +++---- Moose Development/Moose/Wrapper/Unit.lua | 8 ++---- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/Moose Development/Moose/Functional/Autolase.lua b/Moose Development/Moose/Functional/Autolase.lua index 1772e24a3..41e167ef8 100644 --- a/Moose Development/Moose/Functional/Autolase.lua +++ b/Moose Development/Moose/Functional/Autolase.lua @@ -693,7 +693,7 @@ end function AUTOLASE:GetLosFromUnit(Unit) local lasedistance = self.LaseDistance local unitheight = Unit:GetHeight() - local coord = Unit:GetCoordinate() + local coord = Unit:GetCoord() local landheight = coord:GetLandHeight() local asl = unitheight - landheight if asl > 100 then @@ -845,7 +845,7 @@ function AUTOLASE:ShowStatus(Group,Unit) locationstring = entry.coordinate:ToStringLLDDM(settings) elseif settings:IsA2G_BR() then -- attention this is the distance from the ASKING unit to target, not from RECCE to target! - local startcoordinate = Unit:GetCoordinate() or Group:GetCoordinate() + local startcoordinate = Unit:GetCoord() or Group:GetCoord() locationstring = entry.coordinate:ToStringBR(startcoordinate,settings,false,self.RoundingPrecision) end end @@ -963,8 +963,8 @@ function AUTOLASE:CanLase(Recce,Unit) end end -- calculate LOS - local reccecoord = Recce:GetCoordinate() - local unitcoord = Unit:GetCoordinate() + local reccecoord = Recce:GetCoord() + local unitcoord = Unit:GetCoord() local islos = reccecoord:IsLOS(unitcoord,2.5) -- calculate distance local distance = math.floor(reccecoord:Get3DDistance(unitcoord)) @@ -1020,8 +1020,8 @@ function AUTOLASE:_Prescient() self:T(self.lid.."Checking possibly visible STATICs for Recce "..unit:GetName()) for _,_static in pairs(Statics) do -- DCS static object here local static = STATIC:Find(_static) - if static and static:GetCoalition() ~= self.coalition and static:GetCoordinate() then - local IsLOS = position:IsLOS(static:GetCoordinate()) + if static and static:GetCoalition() ~= self.coalition and static:GetCoord() then + local IsLOS = position:IsLOS(static:GetCoord()) if IsLOS then unit:KnowUnit(static,true,true) end @@ -1081,7 +1081,7 @@ function AUTOLASE:onafterMonitor(From, Event, To) local threat = contact.threatlevel or 0 local reccegrp = UNIT:FindByName(reccename) if reccegrp then - local reccecoord = reccegrp:GetCoordinate() + local reccecoord = reccegrp:GetCoord() local distance = math.floor(reccecoord:Get3DDistance(coord)) local text = string.format("%s of %s | Distance %d km | Threatlevel %d",contact.attribute, contact.groupname, math.floor(distance/1000), contact.threatlevel) report:Add(text) @@ -1120,7 +1120,6 @@ function AUTOLASE:onafterMonitor(From, Event, To) local unit = _unit -- Wrapper.Unit#UNIT if unit and unit:IsAlive() then local threat = unit:GetThreatLevel() - local coord = unit:GetCoordinate() if threat >= self.minthreatlevel then local unitname = unit:GetName() -- prefer radar units @@ -1176,16 +1175,16 @@ function AUTOLASE:onafterMonitor(From, Event, To) local code = self:GetLaserCode(reccename) local spot = SPOT:New(recce) spot:LaseOn(unit,code,self.LaseDuration) - local locationstring = unit:GetCoordinate():ToStringLLDDM() + local locationstring = unit:GetCoord():ToStringLLDDM() if _SETTINGS:IsA2G_MGRS() then local precision = _SETTINGS:GetMGRS_Accuracy() local settings = {} settings.MGRS_Accuracy = precision - locationstring = unit:GetCoordinate():ToStringMGRS(settings) + locationstring = unit:GetCoord():ToStringMGRS(settings) elseif _SETTINGS:IsA2G_LL_DMS() then - locationstring = unit:GetCoordinate():ToStringLLDMS(_SETTINGS) + locationstring = unit:GetCoord():ToStringLLDMS(_SETTINGS) elseif _SETTINGS:IsA2G_BR() then - locationstring = unit:GetCoordinate():ToStringBULLS(self.coalition,_SETTINGS) + locationstring = unit:GetCoord():ToStringBULLS(self.coalition,_SETTINGS) end local laserspot = { -- #AUTOLASE.LaserSpot @@ -1198,10 +1197,10 @@ function AUTOLASE:onafterMonitor(From, Event, To) unitname = unitname, reccename = reccename, unittype = unit:GetTypeName(), - coordinate = unit:GetCoordinate(), + coordinate = unit:GetCoord(), } if self.smoketargets then - local coord = unit:GetCoordinate() + local coord = unit:GetCoord() if self.smokeoffset then coord:Translate(self.smokeoffset.Distance,self.smokeoffset.Angle,true,true) end diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index a90327df9..2809c7048 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -638,7 +638,7 @@ CTLD_ENGINEERING = { local crate = ctable[1] -- Ops.CTLD#CTLD_CARGO local static = crate:GetPositionable() -- Wrapper.Static#STATIC local crate_pos = static:GetCoordinate() -- Core.Point#COORDINATE - local gpos = group:GetCoordinate() -- Core.Point#COORDINATE + local gpos = group:GetCoord() -- Core.Point#COORDINATE -- see how far we are from the crate local distance = self:_GetDistance(gpos,crate_pos) self:T(string.format("%s Distance to crate: %d", self.lid, distance)) @@ -667,7 +667,7 @@ CTLD_ENGINEERING = { --local COps = self.C_Ops -- Ops.CTLD#CTLD local group = self.Group -- Wrapper.Group#GROUP local tgtpos = self.currwpt -- Core.Point#COORDINATE - local gpos = group:GetCoordinate() -- Core.Point#COORDINATE + local gpos = group:GetCoord() -- Core.Point#COORDINATE -- see how far we are from the crate local distance = self:_GetDistance(gpos,tgtpos) self:T(string.format("%s Distance remaining: %d", self.lid, distance)) diff --git a/Moose Development/Moose/Ops/Intelligence.lua b/Moose Development/Moose/Ops/Intelligence.lua index a20365af8..173abfcdc 100644 --- a/Moose Development/Moose/Ops/Intelligence.lua +++ b/Moose Development/Moose/Ops/Intelligence.lua @@ -1175,7 +1175,7 @@ function INTEL:_CreateContact(Positionable, RecceName) item.category=3 --static:GetCategory() item.categoryname=static:GetCategoryName() or "Unknown" item.threatlevel=static:GetThreatLevel() or 0 - item.position=static:GetCoordinate() + item.position=static:GetCoord() item.velocity=static:GetVelocityVec3() item.speed=0 item.recce=RecceName @@ -1282,15 +1282,15 @@ function INTEL:GetDetectedUnits(Unit, DetectedUnits, RecceDetecting, DetectVisua local DetectionAccepted = true if self.RadarAcceptRange then - local reccecoord = Unit:GetCoordinate() - local coord = unit:GetCoordinate() + local reccecoord = Unit:GetCoord() + local coord = unit:GetCoord() local dist = math.floor(coord:Get2DDistance(reccecoord)/1000) -- km if dist > self.RadarAcceptRangeKilometers then DetectionAccepted = false end end if self.RadarBlur then - local reccecoord = Unit:GetCoordinate() - local coord = unit:GetCoordinate() + local reccecoord = Unit:GetCoord() + local coord = unit:GetCoord() local dist = math.floor(coord:Get2DDistance(reccecoord)/1000) -- km local AGL = unit:GetAltitude(true) local minheight = self.RadarBlurMinHeight or 250 -- meters diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index 1ca25ca08..77a2e391d 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -1352,9 +1352,7 @@ function UNIT:GetThreatLevel() end ThreatText = ThreatLevels[ThreatLevel + 1] - end - - if self:IsAir() then + elseif self:IsAir() then local ThreatLevels = { [1] = "Unarmed", @@ -1397,9 +1395,7 @@ function UNIT:GetThreatLevel() end ThreatText = ThreatLevels[ThreatLevel + 1] - end - - if self:IsShip() then + elseif self:IsShip() then --["Aircraft Carriers"] = {"Heavy armed ships",}, --["Cruisers"] = {"Heavy armed ships",}, From d0b04ebbbd689e538f3bfd1dd32320172b4bbc7b Mon Sep 17 00:00:00 2001 From: smiki Date: Thu, 5 Feb 2026 10:52:44 +0100 Subject: [PATCH 10/12] Optimizations --- Moose Development/Moose/Functional/Autolase.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Autolase.lua b/Moose Development/Moose/Functional/Autolase.lua index 41e167ef8..f33d635dc 100644 --- a/Moose Development/Moose/Functional/Autolase.lua +++ b/Moose Development/Moose/Functional/Autolase.lua @@ -1200,7 +1200,7 @@ function AUTOLASE:onafterMonitor(From, Event, To) coordinate = unit:GetCoord(), } if self.smoketargets then - local coord = unit:GetCoord() + local coord = unit:GetCoordinate() if self.smokeoffset then coord:Translate(self.smokeoffset.Distance,self.smokeoffset.Angle,true,true) end From dab6f48fe92a77c8f9a675fbb08aa8ae74ecf89e Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 5 Feb 2026 12:20:48 +0100 Subject: [PATCH 11/12] xx --- Moose Development/Moose/Core/Event.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 9b3d96f15..abe39b807 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -340,14 +340,18 @@ EVENTS = { -- @field #string WeaponName Name of the weapon. -- @field DCS#Unit WeaponTgtDCSUnit Target DCS unit of the weapon. -- --- @field Cargo.Cargo#CARGO Cargo The cargo object. --- @field #string CargoName The name of the cargo object. --- -- @field Core.Zone#ZONE Zone The zone object. -- @field #string ZoneName The name of the zone. -- -- @field Wrapper.DynamicCargo#DYNAMICCARGO IniDynamicCargo The dynamic cargo object. -- @field #string IniDynamicCargoName The dynamic cargo unit name. +-- +-- @field #number MarkCoalition Coalition of a marker (if any) +-- @field DCS#Vec3 MarkVec3 Position of a marker +-- @field #string MarkText Text content of a marker, if any +-- @field #number MarkID ID of the marker, for deletion +-- @field #number MarkGroupID Group ID of the group that created the marker +-- @field Core.Point#COORDINATE Coordinate object of the marker, only filled if EVENT.CreateMarkCoordinateOnEvent is set to true (off by default) From a02b99036be0a4906c07c23d441dcba8c8183c8d Mon Sep 17 00:00:00 2001 From: smiki Date: Fri, 6 Feb 2026 11:26:57 +0100 Subject: [PATCH 12/12] [FIXED] nil function --- Moose Development/Moose/Ops/Chief.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index 5f33d4a3d..c2b76c8bf 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -3364,7 +3364,7 @@ end -- @param Ops.Auftrag#AUFTRAG Mission The mission. -- @return #boolean If `true`, one of the cohorts can run the mission. function CHIEF:CanMission(Mission) - return self.commander and self.commander:CanStartMission(Mission) + return self.commander and self.commander:CanMission(Mission) end -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------