Skip to content
Permalink
Browse files

Set a minimum charge on shield transparency.

  • Loading branch information...
GoogleFrog committed Aug 6, 2019
1 parent a2f6fab commit e6b1ac0a6d7c2ea7766c8e162cdf533241bb092b
Showing with 2 additions and 1 deletion.
  1. +2 −1 lups/headers/general.lua
@@ -53,7 +53,8 @@ function GetShieldColor(unitID, self)
local col1 = MergeShieldColor(self.colormap1, frac)
local col2 = self.colormap2 and MergeShieldColor(self.colormap2, frac)

local changeAlphaMult = 0.1 + 0.9*charge/(charge + 100)
local boundCharge = math.max(20, charge)
local changeAlphaMult = 0.1 + 0.9*boundCharge/(boundCharge + 100)
col1[4] = col1[4]*changeAlphaMult
if col2 then
col2[4] = col2[4]*changeAlphaMult

0 comments on commit e6b1ac0

Please sign in to comment.
You can’t perform that action at this time.