mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Guard against nil values
This commit is contained in:
parent
d3d4acd806
commit
b737f4e00c
@ -574,10 +574,12 @@ function onWpnEvent(event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local player = event.initiator
|
local player = event.initiator
|
||||||
targetName = event.target:getTypeName()
|
local targetName = event.target:getTypeName()
|
||||||
local impactPoint = event.target:getPosition().p
|
local impactPoint = event.target:getPosition().p
|
||||||
env.info(weapon.." hit "..targetName)
|
if weapon and targetName then
|
||||||
debugMsg(weapon.." hit "..targetName)
|
env.info(weapon.." hit "..targetName)
|
||||||
|
debugMsg(weapon.." hit "..targetName)
|
||||||
|
end
|
||||||
--env.info('Impact point was at: X: ' .. impactPoint.x .. ' Y: ' .. impactPoint.y .. ' Z: ' .. impactPoint.z)
|
--env.info('Impact point was at: X: ' .. impactPoint.x .. ' Y: ' .. impactPoint.y .. ' Z: ' .. impactPoint.z)
|
||||||
if clusterWeaps[weapon] then
|
if clusterWeaps[weapon] then
|
||||||
local ordnance = event.weapon
|
local ordnance = event.weapon
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user