mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2026-08-27 05:22:03 +00:00
Fixed bug when hit object isn't an unit
This commit is contained in:
@@ -116,8 +116,10 @@ do
|
|||||||
|
|
||||||
-- Friendly aircraft hit
|
-- Friendly aircraft hit
|
||||||
if event.target:getDesc().category == Unit.Category.AIRPLANE or event.target:getDesc().category == Unit.Category.HELICOPTER then
|
if event.target:getDesc().category == Unit.Category.AIRPLANE or event.target:getDesc().category == Unit.Category.HELICOPTER then
|
||||||
if not event.initiator:getPlayerName() then -- Players don't radio out when they're hit
|
if Object.getCategory(event.initiator) == Object.Category.UNIT then
|
||||||
doAmbientChatter("pilotImHit", nil, event.target:getCallsign(), 3)
|
if not event.initiator:getPlayerName() then -- Players don't radio out when they're hit
|
||||||
|
doAmbientChatter("pilotImHit", nil, event.target:getCallsign(), 3)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user