mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -695,9 +695,7 @@ end
|
||||
function IceBarElement.prototype:SetScale(texture, scale)
|
||||
local oldScale = self.CurrScale
|
||||
|
||||
scale = IceHUD:Clamp(scale, 0, 1)
|
||||
|
||||
self.CurrScale = self:LerpScale(scale)
|
||||
self.CurrScale = IceHUD:Clamp(self:LerpScale(scale), 0, 1)
|
||||
|
||||
if oldScale ~= self.CurrScale then
|
||||
if (self.moduleSettings.side == IceCore.Side.Left) then
|
||||
@ -723,7 +721,7 @@ function IceBarElement.prototype:LerpScale(scale)
|
||||
end
|
||||
|
||||
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
|
||||
return scale
|
||||
end
|
||||
|
Reference in New Issue
Block a user