flashflashrevolution / rCubed

Official Flash Flash Revolution game engine.
https://www.flashflashrevolution.com
GNU Affero General Public License v3.0
30 stars 17 forks source link

ReplayPack.as verifyReplayWrite todo, Boos are re-ordered when packed as they can appear in any order but are unpacked in a fixed order, causing false positives. #334

Closed Zageron closed 7 months ago

Zageron commented 2 years ago
// TODO: Boos are re-ordered when packed as they can appear in any order but are
// unpacked in a fixed order, causing false positives.
/*
    compareFailure = 0;
    for (i = 0; i < binReplayBoos.length; i++)
    {
    if (binReplayBoos[i]["d"] != test.rep_boos[i]["d"])
    {
    trace("rep_boos[" + i + "][d]", binReplayBoos[i]["d"], "!=", test.rep_boos[i]["d"], "(" + binReplayBoos[i]["t"], test.rep_boos[i]["t"] + ")");
    compareFailure++;
    }
    if (binReplayBoos[i]["t"] != test.rep_boos[i]["t"])
    {
    trace("rep_boos[" + i + "][t]", binReplayBoos[i]["t"], "!=", test.rep_boos[i]["t"], "(" + binReplayBoos[i]["d"], test.rep_boos[i]["d"] + ")");
    compareFailure++;
    }
    }
    if (compareFailure > 0)
    {
    trace("rep_boos had", compareFailure, "incorrect matchings");
    return false;
    }
    */