- next attempt at fixing SetTexCoord 'out of range' errors...i really can't figure out why this is all of a sudden popping up an error in 3.1 :(

This commit is contained in:
Parnic
2009-04-18 06:38:02 +00:00
parent 7a049340c2
commit a84910886e

View File

@ -695,9 +695,7 @@ end
function IceBarElement.prototype:SetScale(texture, scale) function IceBarElement.prototype:SetScale(texture, scale)
local oldScale = self.CurrScale local oldScale = self.CurrScale
scale = IceHUD:Clamp(scale, 0, 1) self.CurrScale = IceHUD:Clamp(self:LerpScale(scale), 0, 1)
self.CurrScale = self:LerpScale(scale)
if oldScale ~= self.CurrScale then if oldScale ~= self.CurrScale then
if (self.moduleSettings.side == IceCore.Side.Left) then if (self.moduleSettings.side == IceCore.Side.Left) then
@ -723,7 +721,7 @@ function IceBarElement.prototype:LerpScale(scale)
end end
if self.CurrLerpTime < self.moduleSettings.desiredLerpTime then if self.CurrLerpTime < self.moduleSettings.desiredLerpTime then
return IceHUD:Clamp(self.LastScale + ((self.DesiredScale - self.LastScale) * (self.CurrLerpTime / self.moduleSettings.desiredLerpTime)), 0, 1) return self.LastScale + ((self.DesiredScale - self.LastScale) * (self.CurrLerpTime / self.moduleSettings.desiredLerpTime))
else else
return scale return scale
end end