summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-29 17:19:10 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-29 17:19:10 -0300
commit63a06c597c7aa874b4dd87cdcdf1fb881401966c (patch)
tree34d5f9825646f67999f68b9e9724a24494092dfd
parent9421aca90c888b9ea7da6eafad68526a0ce1dadc (diff)
downloadserver-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.gz
server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.bz2
server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.xz
server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.zip
Found a truncation bug
-rw-r--r--player.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/player.py b/player.py
index 77aa165..e94ac51 100644
--- a/player.py
+++ b/player.py
@@ -415,7 +415,7 @@ def get_data(args, token):
# Give you offline AP and refresh to NOW, round down
delta=(now()-Player[token]["aptime"])/AP_REGEN_TIME
delta2=(now()-Player[token]["aptime"])%AP_REGEN_TIME
- Player[token]["ap"]=min(Player[token]["max_ap"], Player[token]["ap"]+delta)
+ Player[token]["ap"]=int(min(Player[token]["max_ap"], Player[token]["ap"]+delta))
Player[token]["aptime"]=now()-delta2
# This is only to start the timer if needed