mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-25 04:25:26 +00:00
AUTOLASE - added nil check for CanLase()
This commit is contained in:
@@ -674,6 +674,7 @@ end
|
|||||||
function AUTOLASE:CanLase(Recce,Unit)
|
function AUTOLASE:CanLase(Recce,Unit)
|
||||||
local canlase = false
|
local canlase = false
|
||||||
-- cooldown?
|
-- cooldown?
|
||||||
|
if Recce and Recce:IsAlive() == true then
|
||||||
local name = Recce:GetName()
|
local name = Recce:GetName()
|
||||||
local cooldown = self.RecceUnits[name].cooldown and self.forcecooldown
|
local cooldown = self.RecceUnits[name].cooldown and self.forcecooldown
|
||||||
if cooldown then
|
if cooldown then
|
||||||
@@ -694,6 +695,7 @@ function AUTOLASE:CanLase(Recce,Unit)
|
|||||||
if distance <= lasedistance and islos then
|
if distance <= lasedistance and islos then
|
||||||
canlase = true
|
canlase = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return canlase
|
return canlase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user