From f406daaa8633afb61078a060b509c32675b6f612 Mon Sep 17 00:00:00 2001 From: sumneko Date: Tue, 16 Apr 2019 15:24:52 +0800 Subject: =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8E=A8=E6=96=AD=E5=8F=96=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=80=BC=E8=80=8C=E4=B8=8D=E6=98=AF=E5=8F=A0=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/value.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src/vm') diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 425cc0b2..c93fda90 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -70,7 +70,9 @@ function mt:setType(tp, rate) end end local current = self._type[tp] or 0.0 - self._type[tp] = current + (1 - current) * rate + if rate > current then + self._type[tp] = rate + end end function mt:getType() -- cgit v1.2.3