1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-22 00:21:32 +00:00

Fixed offline time stuff

This commit is contained in:
Acamaeda 2020-10-15 19:56:08 -04:00
parent 33f493f593
commit bcbdf12dca

View file

@ -347,7 +347,7 @@ var interval = setInterval(function() {
let now = Date.now()
let diff = (now - player.time) / 1e3
if (player.offTime !== undefined) {
if (player.offTime.remain > modInfo.offlineLimit * 3600000) player.offlineTime.remain = modInfo.offlineLimit * 3600000
if (player.offTime.remain > modInfo.offlineLimit * 3600000) player.offTime.remain = modInfo.offlineLimit * 3600000
if (player.offTime.remain > 0) {
let offlineDiff = Math.max(player.offTime.remain / 10, diff)
player.offTime.remain -= offlineDiff