Tuning A2A AI dispatcher to work with new sound speech system.

This commit is contained in:
FlightControl
2019-09-15 18:36:27 +02:00
parent b309c25619
commit 8c54b7298d
2 changed files with 41 additions and 39 deletions

View File

@@ -312,11 +312,13 @@ do -- DETECTION MANAGER
-- Here we handle the transmission of the voice over.
-- If for a certain reason the Defender does not exist, we use the coordinate of the airbase to send the message from.
local RadioQueue = self.RadioQueue -- Core.RadioQueue#RADIOQUEUE
local DefenderUnit = DefenderGroup:GetUnit(1)
if DefenderUnit and DefenderUnit:IsAlive() then
RadioQueue:SetSenderUnitName( DefenderUnit:GetName() )
if RadioQueue then
local DefenderUnit = DefenderGroup:GetUnit(1)
if DefenderUnit and DefenderUnit:IsAlive() then
RadioQueue:SetSenderUnitName( DefenderUnit:GetName() )
end
RadioQueue:Speak( Message )
end
RadioQueue:Speak( Message )
return self
end