- added tons of divide-by-zero protection all over the place

- general cleanup of values passed to UpdateBar
This commit is contained in:
Parnic
2009-04-18 21:07:42 +00:00
parent f11192bfd1
commit 10af4566d6
16 changed files with 24 additions and 19 deletions

View File

@ -697,6 +697,10 @@ function IceBarElement.prototype:SetScale(texture, scale)
self.CurrScale = IceHUD:Clamp(self:LerpScale(scale), 0, 1)
if not self.currScale or self.currScale == (1/0) or self.currScale == (0/0) then
self.currScale = 0
end
if oldScale ~= self.CurrScale then
if (self.moduleSettings.side == IceCore.Side.Left) then
texture:SetTexCoord(1, 0, 1-self.CurrScale, 1)