Skip to content

Commit c272fa5

Browse files
XNTEABDSCsprunk
authored andcommitted
Fix a typo in target priority gadget.
1 parent dc91e3a commit c272fa5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

LuaRules/Gadgets/unit_target_priority.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,18 +356,18 @@ function gadget:AllowWeaponTarget(unitID, targetID, attackerWeaponNum, attackerW
356356

357357
--// Radar dot handling. Radar dots are not handled by subsequent areas because a unit which is
358358
-- identified but not visible cannot have priority based on health or other status effects.
359-
local visiblity = cache_GetUnitVisibility(targetID, allyTeam)
359+
local visibility = cache_GetUnitVisibility(targetID, allyTeam)
360360

361-
if visiblity ~= 2 then
361+
if visibility ~= 2 then
362362
local wobbleAdd = (radarDotPenalty[attackerWeaponDefID] or 0)
363363
-- Mobile units get a penalty for radar wobble. Identified statics experience no wobble.
364364
if radarWobblePenalty[attackerWeaponDefID] and (visibility == 0 or not remStatic[enemyUnitDefID]) then
365365
wobbleAdd = radarWobblePenalty[attackerWeaponDefID]
366366
end
367367

368-
if visiblity == 0 then
368+
if visibility == 0 then
369369
return true, 25 + wobbleAdd + velocityAdd + lastShotBonus
370-
elseif visiblity == 1 then
370+
elseif visibility == 1 then
371371
-- If the unit type is accessible then it can be included in the priority calculation.
372372
return true, GetPriority(enemyUnitDefID, attackerWeaponDefID) + wobbleAdd + velocityAdd + 1.5 + lastShotBonus
373373
end

0 commit comments

Comments
 (0)