chillmeter: make decay work properly with negative chill level
parent
dd0ade6136
commit
213b83871d
|
@ -67,8 +67,12 @@ def measure(phenny, input):
|
|||
now = time.time()
|
||||
if now - measure.last_tick > 60:
|
||||
measure.last_tick = now
|
||||
if chill > 0:
|
||||
chill -= chill_decay_rate
|
||||
chill = max(0, chill)
|
||||
elif chill < 0:
|
||||
chill += chill_decay_rate
|
||||
chill = min(0, chill)
|
||||
measure.channels[input.sender] = chill
|
||||
|
||||
if ".chill" in input:
|
||||
|
|
Loading…
Reference in New Issue