Merge pull request #1921 from FlightControl-Master/FF/MasterDevel

Update Range.lua
This commit is contained in:
Frank 2023-02-12 13:03:08 +01:00 committed by GitHub
commit 92c5c32e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3475,14 +3475,15 @@ function RANGE:_GetBombTargetCoordinate( target )
if target.type == RANGE.TargetType.UNIT then if target.type == RANGE.TargetType.UNIT then
if not target.move then -- Check if alive
-- Target should not move.
coord = target.coordinate
else
-- Moving target. Check if alive and get current position
if target.target and target.target:IsAlive() then if target.target and target.target:IsAlive() then
-- Get current position.
coord = target.target:GetCoordinate() coord = target.target:GetCoordinate()
end -- Save as last known position in case target dies.
target.coordinate=coord
else
-- Use stored position.
coord = target.coordinate
end end
elseif target.type == RANGE.TargetType.STATIC then elseif target.type == RANGE.TargetType.STATIC then