Skip to content

Commit

Permalink
Revert "Hide disabled weapons on range overlay"
Browse files Browse the repository at this point in the history
This reverts commit fa3d501.
  • Loading branch information
lL1l1 committed Jan 26, 2024
1 parent fa3d501 commit 0dc2d34
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lua/sim/weapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -682,21 +682,15 @@ Weapon = ClassWeapon(WeaponMethods) {
SetWeaponEnabled = function(self, enable)
if not IsDestroyed(self) then
if not enable then
self:ChangeMaxRadius(0)
self:ChangeMinRadius(0)
self:SetEnabled(enable)
return
end
local Max = self.Blueprint.MaxRadius
local Min = self.Blueprint.MinRadius or 0
local enabledByEnh = self.Blueprint.EnabledByEnhancement
if enabledByEnh then
local enhancements = SimUnitEnhancements[self.unit.EntityId]
if enhancements then
for _, enh in enhancements do
if enh == enabledByEnh then
self:ChangeMaxRadius(Max)
self:ChangeMinRadius(Min)
self:SetEnabled(enable)
return
end
Expand All @@ -705,8 +699,6 @@ Weapon = ClassWeapon(WeaponMethods) {
-- enhancement needed, but doesn't have it; don't allow weapon to be enabled
return
end
self:ChangeMaxRadius(Max)
self:ChangeMinRadius(Min)
self:SetEnabled(enable)
end
end,
Expand Down

0 comments on commit 0dc2d34

Please sign in to comment.