diff --git a/system.cpp b/system.cpp index 0cf34fbb..7a652116 100644 --- a/system.cpp +++ b/system.cpp @@ -778,19 +778,20 @@ void saveStats(bool emergency = false) { int c = anticheat::certify(dnameof(tactic::lasttactic), turncount, t, (int) timerstart, xcode*999 + tactic::id + 256 * score); - fprintf(f, "TACTICS %s %d %d %d %d %d %d %d date: %s\n", VER, + fprintf(f, "TACTICS %s %d %d %d %d %d %d %d %d date: %s\n", VER, tactic::id, tactic::lasttactic, score, turncount, t, int(timerstart), - c, buf); + c, xcode, buf); tactic::record(tactic::lasttactic, score); anticheat::nextid(tactic::id, VER, c); } } if(yendor::on) - fprintf(f, "YENDOR %s %d %d %d %d %d %d %d date: %s\n", VER, + fprintf(f, "YENDOR %s %d %d %d %d %d %d %d %d date: %s\n", VER, yendor::lastchallenge, items[itOrbYendor], yendor::won, turncount, t, int(timerstart), anticheat::certify(yendor::won ? "WON" : "LOST", turncount, t, (int) timerstart, xcode*999 + yendor::lastchallenge + 256 * items[itOrbYendor]), + xcode, buf); fclose(f); @@ -920,30 +921,38 @@ void loadsave() { ok = false; char buf1[80], ver[10]; int tid, land, score, tc, t, ts, cert; - sscanf(buf, "%70s%10s%d%d%d%d%d%d%d", - buf1, ver, &tid, &land, &score, &tc, &t, &ts, &cert); - + int xc = -1; + sscanf(buf, "%70s%10s%d%d%d%d%d%d%d%d", + buf1, ver, &tid, &land, &score, &tc, &t, &ts, &cert, &xc); + eLand l2 = eLand(land); if(land == laMirror && verless(ver, "10.0")) l2 = laMirrorOld; + + if(xc == -1) + for(xc=0; xc<32768; xc++) + if(anticheat::check(cert, ver, dnameof(l2), tc, t, ts, xc*999+unsigned(tid) + 256 * score)) + break; - for(int xc=0; xc 0 && cid < YENDORLEVELS) if(!(verless(ver, "8.0f") && oy > 1 && cid == 15)) @@ -951,7 +960,6 @@ void loadsave() { { yendor::bestscore[xc][cid] = max(yendor::bestscore[xc][cid], oy); } - break; } }