client
proc
LoadChar(S)
screen=null
if(S==1)
var/savefile/F=new("Player Saves/[ckey]/Slot 1.sav")
F["name"]>>mob.name
F["mob"]>>mob
F["x"]>>mob.x
F["y"]>>mob.y
F["z"]>>mob.z
if(S==2)
var/savefile/F=new("Player Saves/[ckey]/Slot 2.sav")
F["name"]>>mob.name
F["mob"]>>mob
F["x"]>>mob.x
F["y"]>>mob.y
F["z"]>>mob.z
if(S==3)
var/savefile/F=new("Player Saves/[ckey]/Slot 3.sav")
F["name"]>>mob.name
F["mob"]>>mob
F["x"]>>mob.x
F["y"]>>mob.y
F["z"]>>mob.z
SaveChar()
if(!src||!mob||!mob.loggedin||cantsaveatall)return
if(mob.save_file_1)
var/savefile/F=new("Player Saves/[ckey]/Slot 1.sav")
F["name"]<<mob.name
F["mob"]<<mob
F["x"]<<mob.x
F["y"]<<mob.y
F["z"]<<mob.z
if(mob.save_file_2)
var/savefile/F=new("Player Saves/[ckey]/Slot 2.sav")
F["name"]<<mob.name
F["mob"]<<mob
F["x"]<<mob.x
F["y"]<<mob.y
F["z"]<<mob.z
if(mob.save_file_3)
var/savefile/F=new("Player Saves/[ckey]/Slot 3.sav")
F["name"]<<mob.name
F["mob"]<<mob
F["x"]<<mob.x
F["y"]<<mob.y
F["z"]<<mob.z
mob
Logout()
..()
del(src)
mob
PC
Logout()
del(src)
client
proc
AutoSave()
set background=1
spawn while(1)
if(cantsaveatall||!src)break
src<<"<u>[servername]:</u></font> Character <font color=green>saved</font>!"
SaveChar()
sleep(6000)
client
Del()
if(istype(mob,/mob/Guest))return ..()
if(istype(mob,/mob/PC))
SaveChar()
for(var/mob/P in world)if(P.name=="PC-[src.key]-PC")del(P)
..()
Problem description:
Sometimes people report weird rollbacks from a few hours to a few days, they get randomly teleported in locations with stats rollbacked, even though saving happens every few min and on client del. Also from what I can tell the way it happends is when they get a random disconnect and then log back in play for few days and then the rollback happends they get to that moment of past disconnect.
Current Player Save's: 6 710 If it matters.