redraskal / r6-dissect

Match Replay API/CLI for Rainbow Six: Siege's Dissect (.rec) format.
MIT License
70 stars 11 forks source link

"won" attribute set inconsistently with "score" attribute for defuser planted in last second edge case #86

Open CodingPenguin1 opened 9 months ago

CodingPenguin1 commented 9 months ago

Describe the bug Team can be marked as having won a round even though the lost it. Score is updated correctly.

To Reproduce I believe this issue is caused when the defuser is finished being planted after the action phase ends. In the case I found, there was a 1v1 in the last seconds of the round. The attacker planted the defuser, starting before the round ended, and finishing after the round would have ended. This, of course, adds 45s to the timer for the defender to stop the defuser. In this case, that happened. The defender killed the attacker and stopped the defuser. The following was output to the JSON after running r6-dissect

"teams": [
    {
        "name": "Kenough Uni",
        "score": 6,
        "won": false,
        "role": "Defense"
    },
    {
        "name": "UC Acad",
        "score": 0,
        "won": true,
        "winCondition": "DefusedBomb",
        "role": "Attack"
    }

Expected behavior The "won" value should be flipped for each team. "Kenough Uni" should have true for "won" and "UC Acad" false.

redraskal commented 9 months ago

the defuser disable event was likely not recorded, so the win condition defaults to a defuse.

redraskal commented 9 months ago

can you send the replay to ben@ctos.sh @CodingPenguin1?

my guess is the match timer was not at 0.00, so the disable event was ignored

CodingPenguin1 commented 8 months ago

@redraskal sent

redraskal commented 8 months ago

@CodingPenguin1 the disable timer did not reach 0 when stopped (ended on 0.022). r6-dissect should probably rely on an actual defuser state as opposed to the timer.

this requires more research, not sure when i'll have a solution

CodingPenguin1 commented 8 months ago

No worries, glad to have found an edge case for you