Browse Source

Clamp bar;

bjorn 10 years ago
parent
commit
651cf14792
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hud.lua

+ 1 - 1
hud.lua

@@ -262,7 +262,7 @@ function Hud:gui()
   local baseWidth = 20
   local baseHeight = 100
   g.rectangle('line', 2, 50, baseWidth, baseHeight)
-  local prc = math.lerp(self.prevRainbowShitDisplay, self.rainbowShitDisplay, ls.accum / ls.tickrate) / Pigeon.rainbowShitThreshold
+  local prc = math.clamp(math.lerp(self.prevRainbowShitDisplay, self.rainbowShitDisplay, ls.accum / ls.tickrate) / Pigeon.rainbowShitThreshold, 0, 1)
   g.setColor(255, 0, 0)
   g.rectangle('fill', 2, 50 + baseHeight * (1 - prc), baseWidth, baseHeight * prc)