mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#CSAR
- triple try to get coordinate for beacon
This commit is contained in:
commit
282b199754
@ -2026,9 +2026,12 @@ function CSAR:_AddBeaconToGroup(_group, _freq)
|
|||||||
|
|
||||||
if _group:IsAlive() then
|
if _group:IsAlive() then
|
||||||
local _radioUnit = _group:GetUnit(1)
|
local _radioUnit = _group:GetUnit(1)
|
||||||
local Frequency = _freq -- Freq in Hertz
|
if _radioUnit then
|
||||||
local Sound = "l10n/DEFAULT/"..self.radioSound
|
local Frequency = _freq -- Freq in Hertz
|
||||||
trigger.action.radioTransmission(Sound, _radioUnit:GetPositionVec3(), 0, false, Frequency, 1000) -- Beacon in MP only runs for exactly 30secs straight
|
local Sound = "l10n/DEFAULT/"..self.radioSound
|
||||||
|
local vec3 = _radioUnit:GetVec3() or _radioUnit:GetPositionVec3() or {x=0,y=0,z=0}
|
||||||
|
trigger.action.radioTransmission(Sound, vec3, 0, false, Frequency, 1000) -- Beacon in MP only runs for exactly 30secs straight
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user