diff --git a/LuaRules/Gadgets/unit_target_on_the_move.lua b/LuaRules/Gadgets/unit_target_on_the_move.lua index b54758d33e..aa7224ef06 100644 --- a/LuaRules/Gadgets/unit_target_on_the_move.lua +++ b/LuaRules/Gadgets/unit_target_on_the_move.lua @@ -81,8 +81,7 @@ local setTargetSpeedMult = {} for i = 1, #UnitDefs do local ud = UnitDefs[i] weaponCounts[i] = (ud.weapons and #ud.weapons) - if ((not (ud.canFly and ((ud.isBomber or ud.isBomberAirUnit) and not ud.customParams.can_set_target))) and - ud.canAttack and ud.canMove and ud.maxWeaponRange and ud.maxWeaponRange > 0) or ud.isFactory then + if (ud.maxWeaponRange and ud.maxWeaponRange > 0) or ud.isFactory then if getMovetype(ud) == 0 then waitWaitUnits[i] = true end diff --git a/LuaUI/Widgets/unit_showallcommands_2.lua b/LuaUI/Widgets/unit_showallcommands_2.lua index 1abdb8cb0a..a62c104f7d 100644 --- a/LuaUI/Widgets/unit_showallcommands_2.lua +++ b/LuaUI/Widgets/unit_showallcommands_2.lua @@ -66,8 +66,7 @@ local gaiaTeamID = Spring.GetGaiaTeamID() local setTargetUnitDefIDs = {} for i = 1, #UnitDefs do local ud = UnitDefs[i] - if ((not (ud.canFly and ((ud.isBomber or ud.isBomberAirUnit) and not ud.customParams.can_set_target))) and - ud.canAttack and ud.canMove and ud.maxWeaponRange and ud.maxWeaponRange > 0) or ud.isFactory then + if (ud.maxWeaponRange and ud.maxWeaponRange > 0) or ud.isFactory then setTargetUnitDefIDs[i] = true end end