mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added tons of divide-by-zero protection all over the place
- general cleanup of values passed to UpdateBar
This commit is contained in:
@ -73,7 +73,7 @@ function MirrorBar.prototype:OnUpdate(elapsed)
|
||||
|
||||
self.value = self.value + (self.timerScale * elapsed * 1000)
|
||||
|
||||
scale = self.value / self.maxValue
|
||||
scale = self.maxValue > 0 and self.value / self.maxValue or 0
|
||||
|
||||
if (scale < 0) then -- lag compensation
|
||||
scale = 0
|
||||
|
Reference in New Issue
Block a user