splewis / get5

CS:GO Sourcemod plugin for competitive matches/scrims
GNU General Public License v3.0
558 stars 176 forks source link

Don't consume pauses until they start + GSI support + Pause begin forward/event #910

Closed nickdnk closed 1 year ago

nickdnk commented 1 year ago

Current logic causes a pause to be consumed for a team immediately as a player types !pause or !tech. This changes this so the pause isn't consumed until the pause actually starts, and so that it can be !unpause'ed before the round ends. I'm not entirely sure we want this, but here it is as a proposal. Thoughts?

I also reintroduced the GSI for fixed tactical pauses, as that may be best for some tournaments, so the fixed pause duration can be displayed in a custom overlay. This does mean, however, that the pause timers are doubled for players.

nickdnk commented 1 year ago

Reminder to myself: Pausing during knife consumes a pause but does not actually pause. Work is still needed.

LukasW1337 commented 1 year ago

As someone who uses get5 for tournaments, I support using the GSI when having a defined tactical timeout. This just makes sense for broadcast wise, and the players in-game.

Don't exactly know how to interpret this:

This does mean, however, that the pause timers are doubled for players.

Is it meant that it shows the timer both in UI and in chat?

It does become a real pile of confusion if someone takes a tech timeout while in a tactical timeout.

nickdnk commented 1 year ago

This has been rebased on dev and is now ready for some testing.

I've introduced a few changes:

  1. The default tactical pause logic is now a fixed duration of 60 seconds (get5_fixed_pause_time 60) instead of a combined 300 seconds (get5_max_pause_time 300), which is more in line with FaceIT, Matchmaking and any pro game. For anyone upgrading on an existing server, this does not matter, as it's just the default values that are changed.
  2. You can now set get5_allow_unpausing_fixed_pauses 0 if you don't want to allow !unpause during fixed-duration pauses.
  3. The GSI for pauses seems to be working as intended now. I need someone using GOTV overlays with the GSI to actually test if it behaves as expected.
  4. If you pause during the knife or post-knife, Get5 hints will still be used, but they will be switched for the built-in pauses once the game is live. The GSI for pauses does not work during warmup, but the game still pauses, so this is kind of a workaround that seems to check all the boxes.
  5. You no longer need to enable tactical pauses to have access to technical pauses. Before, get5_allow_pauses 0 would disable both pause types, even if get5_allow_technical_pause was enabled.
  6. If the pausing team calls !unpause before their pause has begun (i.e. sometime before freezetime begins), the game does not pause and no pauses are consumed.

Edit: Also note that as this PR sits on top of dev, it also includes the new customizable veto system. Please read the docs: https://splewis.github.io/get5/dev/veto/´

Edit: Newer build from below comment: https://github.com/splewis/get5/actions/runs/4057808632

nickdnk commented 1 year ago

After some testing:

  1. The GSI now works in all cases I can realistically think of. We had an issue where the timeout was toggled but the game was not actually paused according to gameprops, which confused some GSI overlays to not indicate a pause. This has been resolved (I think, need a test to confirm). Edit: Confirmed working.

  2. A forward called Get5_OnPauseBegan has been added, which fires when a pause actually starts. This could be used to mute/unmute certain players or coaches during pauses. Closes https://github.com/splewis/get5/issues/924.

  3. A message has been added as feedback about !stop not being available when called freezetime. Players are expected to use !tech at this stage, and getting confirmation from the other team before freezetime runs out is also difficult anyway. If the game is paused for backup, !stop can be used multiple times during freeztime if required.

  4. The pause timer is now restarted to 0:00 when the round starts, as it may otherwise be off by up to 1 second as it is started whenever the !pause command is issued, which may be out of sync with the start of the round.

  5. You can now elect to disable pause cancellation by setting get5_allow_pause_cancellation 0.

Newest build: https://github.com/splewis/get5/actions/runs/4057808632

nickdnk commented 1 year ago

Squashed, ready for merge pending some testing.