mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
SEAD - fix a rare case when a coordinate of a weapon cannot be found
This commit is contained in:
parent
56ed3a11d6
commit
300092d07d
@ -485,7 +485,8 @@ function SEAD:HandleEventShot( EventData )
|
|||||||
elseif targetcat == Object.Category.STATIC then
|
elseif targetcat == Object.Category.STATIC then
|
||||||
self:T("*** Target Category STATIC")
|
self:T("*** Target Category STATIC")
|
||||||
local seadset = SET_GROUP:New():FilterPrefixes(self.SEADGroupPrefixes):FilterOnce()
|
local seadset = SET_GROUP:New():FilterPrefixes(self.SEADGroupPrefixes):FilterOnce()
|
||||||
local tgtcoord = COORDINATE:NewFromVec3(_target:getPoint())
|
local targetpoint = _target:getPoint() or {x=0,y=0,z=0}
|
||||||
|
local tgtcoord = COORDINATE:NewFromVec3(targetpoint)
|
||||||
local tgtgrp = seadset:FindNearestGroupFromPointVec2(tgtcoord)
|
local tgtgrp = seadset:FindNearestGroupFromPointVec2(tgtcoord)
|
||||||
if tgtgrp and tgtgrp:IsAlive() then
|
if tgtgrp and tgtgrp:IsAlive() then
|
||||||
_targetgroup = tgtgrp
|
_targetgroup = tgtgrp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user