Update Range.lua

attempt to index local 'target' (a nil value)

Was using this build in another mission. Added a nilcheck.
env.info('*** MOOSE GITHUB Commit Hash ID: 2025-02-14T06:13:08+01:00-24b320077721d45774acd56b25086ef6bdfb2e5a ***')
This commit is contained in:
leka1986 2025-02-18 21:23:58 +01:00 committed by GitHub
parent f9ba96f228
commit a520daeb56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1933,7 +1933,7 @@ function RANGE:OnEventHit( EventData )
local _currentTarget = self.strafeStatus[_unitID] --#RANGE.StrafeStatus
-- Player has rolled in on a strafing target.
if _currentTarget and target:IsAlive() then
if _currentTarget and target and target:IsAlive() then
local playerPos = _unit:GetCoordinate()
local targetPos = target:GetCoordinate()