- cleaned up some code from my fights with SetTexCoord/nan

This commit is contained in:
Parnic
2009-04-19 00:33:01 +00:00
parent 368579ec04
commit 9a8d5317c9
2 changed files with 1 additions and 5 deletions

View File

@ -697,10 +697,6 @@ 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)

View File

@ -811,7 +811,7 @@ function IceHUD:Clamp(value, min, max)
value = min
elseif value > max then
value = max
elseif not (value >= min and value <= max) then
elseif value ~= value or not (value >= min and value <= max) then -- check for nan...
value = min
end