Skip to content
Snippets Groups Projects

Draft: Prevent Redo Level from not saving replays

Open wehrlia requested to merge wehrlia/RingRacers:repeatlvl into master

Related issue: #216

Marked as a draft because there's probably a million ways to do this, be it through modifying Redo Level (which is what this MR currently does), creating an entirely new vote option, or by doing something else entirely that I haven't thought about yet. Also because I want to hear your (developer(s) reading this) thoughts on this.

As it stands currently, this MR makes it so that if

  1. There's more than one person playing, and
  2. Race is at 2 laps,

Redo Level will queue up the current map, so that it restarts after the ranking screen (replays are only saved at that screen), instead of abruptly restarting the race. If those conditions aren't met, the map will be abruptly restarted like normal. A "map was queued" message appears in the console though, which should be changed to something more descriptive, but I'm not sure how to do that (help!).

Condition 1 might be unnecessary and/or arbitrary, but I think condition 2 is definitely needed, if the "Modify Redo Level" route is to be taken.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • wehrlia added 3 commits

    added 3 commits

    • 88894bc1 - Do not check for number of players anymore
    • 52089d68 - Check if race is halfway done instead of at 2 laps
    • fe188d66 - Clarify comment

    Compare with previous version

  • Author Contributor

    Just to explain my reasoning behind condition 1, and why I have removed it.

    My initial thought was like, what if someone joins a room with only one person playing, and wants to play the current map being raced, by having the one person playing call a Redo vote? But actually, I did not consider the fact that the entire race is restarted automatically when a person joins a room with only 1 or 2 people playing, making condition 1 pretty much useless.

    Unrelated to this, but another thing I wanted to talk about: I think it might be better to, instead of checking if race is at 2 laps specifically, do it based on how many laps a map actually has (numlaps). Because some maps have 2 laps in total, while others have 5 or 8, so using a fixed number to check for condition 2 is gonna create, in my opinion, inconsistent behavior across different maps. Or, well, doing that might actually create inconsistent behavior, since the exact number to check for condition 2 is not gonna be the same across different maps. I don't know, I'm still gonna do it based on numlaps, since it will always correspond to the race being halfway done regardless of how many laps a map actually has, but let me know if that's not very wise.

    I should also find a way to check whether a Battle match is halfway done, but I'm gonna need more research to do that.

  • wehrlia added 25 commits

    added 25 commits

    • fe188d66...902b2d5f - 19 commits from branch KartKrew:master
    • 7edc0beb - Prevent Redo Level from not saving replays
    • 9b12c7a2 - Do not check for number of players anymore
    • dfbf9a01 - Check if race is halfway done instead of at 2 laps
    • 898e95f2 - Clarify comment
    • 33fecaa5 - Actually, check if someone has finished instead
    • 6ba71475 - Remove "Copied from K_CheckSpectate..." comment

    Compare with previous version

  • Eidolon added Bug label

    added Bug label

Please register or sign in to reply
Loading