diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-29 17:19:10 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-29 17:19:10 -0300 |
commit | 63a06c597c7aa874b4dd87cdcdf1fb881401966c (patch) | |
tree | 34d5f9825646f67999f68b9e9724a24494092dfd | |
parent | 9421aca90c888b9ea7da6eafad68526a0ce1dadc (diff) | |
download | server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.gz server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.bz2 server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.tar.xz server-63a06c597c7aa874b4dd87cdcdf1fb881401966c.zip |
Found a truncation bug
-rw-r--r-- | player.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |