summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/value.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/src/core/value.lua b/server/src/core/value.lua
index a998d195..61882175 100644
--- a/server/src/core/value.lua
+++ b/server/src/core/value.lua
@@ -25,9 +25,8 @@ function mt:inference(tp, rate)
if not self._type then
self._type = {}
end
- if not self._type[tp] or rate > self._type[tp] then
- self._type[tp] = rate
- end
+ local current = self._type[tp] or 0.0
+ self._type[tp] = current + (1 - current) * rate
end
function mt:getType()