momentum-mod / game

Momentum Mod - Standalone Source Movement Speedrunning (READ README)
https://momentum-mod.org
Other
527 stars 210 forks source link

Change mom_restart_stage to work on linear maps #1579

Closed hexaflexahexagon closed 1 month ago

hexaflexahexagon commented 2 years ago

I think we changed this intentionally at one point to help surfers playing rj and getting owned by their keybind but now that we have (will have) proper safeguards that seems like a better solution.

If somebody uses the command in jump/conc for the first time we could potentially have a popup that says "hey you're in rj land that'll restart you to the beginning of the course, not the jump" which you can select ok / never show again

braem commented 2 years ago

So not really have it work, just to warn ppl when they use it?

hexaflexahexagon commented 2 years ago

i'll expand since i wrote this issue on mobile and was lazy:

there was a discussion in discord about the command and how people would like to have one "i fucked up the level let me go to the beginning of the section" bind in surf, but currently mom_restart_stage does nothing on linear maps and only works on staged maps. meaning you still need mom_restart in staged maps, which is 2 key binds for a very similar action. the solution is to change the behavior back to how we used to have it where mom_restart_stage restarts you to the beginning on linear maps like expected.

the reason we changed this is because some surfers would play rocket jump and try to mom_restart_stage to the beginning of a level, which we zone as checkpoints, so they'd get sent back to the start of the course by accident. I think this is fixed by:

  1. safeguards, which I don't think we had at that point.
  2. a one-time panorama prompt whenever you use mom_restart_staged in rj/sj/conc (which are all zoned by course=stage, jump=checkpoint) that basically says "hey this is going to do x, that might not be what you want. click go away or go away forever."

number 2 doesn't have to be done with this PR since hud pano isn't fully realized yet but it's just something we can add if the aforementioned issue pops up again, all this card is saying is that we should make mom_restart_stage on linear-zoned maps reset you to the start of the map (stage 0, if you will) rather than just showing a pop up that says "hey use mom_restart"

Arkanoid0 commented 2 years ago

meaning you still need mom_restart in staged maps, which is 2 key binds for a very similar action. the solution is to change the behavior back to how we used to have it where mom_restart_stage restarts you to the beginning on linear maps like expected.

I'm not sure this argument really tracks, regardless of whether mom_restart_stage resets the map on maps that do not have stages, you still need a way to restart the whole map rather than just the stage, so you need both bound anyway, and now you have 2 binds that do the exact same thing on some maps, but different things on other maps.

Second, if you choose to only have stage bound and use a chat command for map restart in lieu of a safeguard, you now have a button that resets the whole map when you play a linear, when you didn't want that in the first place.

Even worse, we have separate safeguards for run restart and stage restart, so on a linear map you could have 2 buttons that reset the map with different safeguards on them. You can't even be clever and apply the correct safeguard action contextually based on action, because then on a staged map your stage restart button will have a different safeguard depending on if you are in stage1 or not.

Instead, mom_restart_stage should just be contextual (and probably renamed) as discussed here. The only place it really makes sense for it to restart the whole map is on stage 1 of a staged map, but generally i think every solution kinda sucks for various reasons.