Merge branch 'master' into develop

This commit is contained in:
Frank 2023-02-12 13:04:32 +01:00
commit 7280c17506

View File

@ -3474,17 +3474,18 @@ function RANGE:_GetBombTargetCoordinate( target )
local coord = nil -- Core.Point#COORDINATE local coord = nil -- Core.Point#COORDINATE
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. if target.target and target.target:IsAlive() then
coord = target.coordinate -- Get current position.
coord = target.target:GetCoordinate()
-- Save as last known position in case target dies.
target.coordinate=coord
else else
-- Moving target. Check if alive and get current position -- Use stored position.
if target.target and target.target:IsAlive() then coord = target.coordinate
coord = target.target:GetCoordinate()
end
end end
elseif target.type == RANGE.TargetType.STATIC then elseif target.type == RANGE.TargetType.STATIC then
-- Static targets dont move. -- Static targets dont move.