mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50: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)
|
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
|
||||||
|
Reference in New Issue
Block a user