Bugfix: drink used max instead of min (instantly full)

master
Ben Deutsch 2015-07-14 07:07:19 +02:00
parent b2a48273be
commit 2766c1a150
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ function thirsty._drink(pl, value, max)
-- test whether we're not *above* max;
-- this function should not remove any overhydration
if pl.hydro < max then
pl.hydro = math.max(pl.hydro + value, max)
pl.hydro = math.min(pl.hydro + value, max)
--print("Drinking by "..value.." to "..pl.hydro)
return true
end