Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2023-05-25 08:24:16 +02:00
commit 4d9ce80c98
2 changed files with 4 additions and 2 deletions

View File

@ -1224,7 +1224,7 @@ function EVENT:onEvent( Event )
if Event.TgtObjectCategory == Object.Category.STATIC then if Event.TgtObjectCategory == Object.Category.STATIC then
-- get base data -- get base data
Event.TgtDCSUnit = Event.target Event.TgtDCSUnit = Event.target
if Event.target:isExist() and Event.id ~= 33 and not Event.TgtObjectCategory == Object.Category.COORDINATE then -- leave out ejected seat object if Event.target:isExist() and Event.id ~= 33 then -- leave out ejected seat object
Event.TgtDCSUnitName = Event.TgtDCSUnit:getName() Event.TgtDCSUnitName = Event.TgtDCSUnit:getName()
Event.TgtUnitName = Event.TgtDCSUnitName Event.TgtUnitName = Event.TgtDCSUnitName
Event.TgtUnit = STATIC:FindByName( Event.TgtDCSUnitName, false ) Event.TgtUnit = STATIC:FindByName( Event.TgtDCSUnitName, false )

View File

@ -805,7 +805,9 @@ function RESCUEHELO:_OnEventCrashOrEject(EventData)
self:T(self.lid..text) self:T(self.lid..text)
-- Get coordinate of unit. -- Get coordinate of unit.
local coord=unit:GetCoordinate() --local coord=unit:GetCoordinate()
local Vec3 = EventData.IniDCSUnit:getPoint() -- Vec3
local coord = COORDINATE:NewFromVec3(Vec3)
if coord and self.rescuezone:IsCoordinateInZone(coord) then if coord and self.rescuezone:IsCoordinateInZone(coord) then