mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Updated bug in Detection and other classes. Now only alive units are considered when broadcasting a message to a SET_GROUP. Made DESIGNATE crash in certain cases.
This commit is contained in:
parent
837361e899
commit
0ea5c7fa48
@ -1393,7 +1393,7 @@ do -- DESIGNATE
|
||||
self:F( "Smoking ..." )
|
||||
|
||||
local RecceGroup = self.RecceSet:FindNearestGroupFromPointVec2(SmokeUnit:GetPointVec2())
|
||||
local RecceUnit = RecceGroup:GetUnit( 1 )
|
||||
local RecceUnit = RecceGroup:GetUnit( 1 ) -- Wrapper.Unit#UNIT
|
||||
|
||||
if RecceUnit then
|
||||
|
||||
|
||||
@ -1524,12 +1524,12 @@ do -- DETECTION_BASE
|
||||
local DetectedItem = {}
|
||||
self.DetectedItemCount = self.DetectedItemCount + 1
|
||||
self.DetectedItemMax = self.DetectedItemMax + 1
|
||||
|
||||
|
||||
|
||||
DetectedItemKey = DetectedItemKey or self.DetectedItemMax
|
||||
self.DetectedItems[DetectedItemKey] = DetectedItem
|
||||
|
||||
local DetectedItemIndex = DetectedItemKey or self.DetectedItemMax
|
||||
self.DetectedItemsByIndex[DetectedItemIndex] = DetectedItem
|
||||
DetectedItem.Index = DetectedItemIndex
|
||||
self.DetectedItemsByIndex[DetectedItemKey] = DetectedItem
|
||||
DetectedItem.Index = DetectedItemKey
|
||||
|
||||
DetectedItem.Set = Set or SET_UNIT:New():FilterDeads():FilterCrashes()
|
||||
DetectedItem.ItemID = ItemPrefix .. "." .. self.DetectedItemMax
|
||||
|
||||
@ -1101,7 +1101,7 @@ function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Nam
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
if DCSObject:isExist() then
|
||||
MessageSetGroup:ForEachGroup(
|
||||
MessageSetGroup:ForEachGroupAlive(
|
||||
function( MessageGroup )
|
||||
self:GetMessage( Message, Duration, Name ):ToGroup( MessageGroup )
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user