-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match Restore Coach Fix #754
Conversation
Moving this to a draft because I would like to make further improvements on how coaches are handled. Mainly the following:
I've also introduced a new PauseType enum specifically for match restoration, since we do not want to trip up any of the |
So player placement on round restore gets to be reaaaaal buggy. However, I think we may be best off just blocking on who can coach on a round restore as well. I'd like to get some more people to test these new features and let me know how it goes, but I don't think I ran into anything too terrible when working with the backup structure. |
4a477ad
to
a0ad3f8
Compare
Okay, to address one of the coach bug issues someone was intermittently having as well, I've introduced I've also updated the structs to be plural, since we can allow multiple coaches, and they both load from JSON and KeyValue files. Documentation has been updated to show for it as well.
|
445289c
to
df5b2a7
Compare
Fix Coaching Command It appears the regular coach command can only now be invoked if we are in warmup. So we want to check if we're in freeze time when allowing users to let us manually move them to the coaching position. Add in coach tracking. Add in basics for storing coaches in backup structure. Still need to test backups, but it appears that joining the coach slot and reconnecting now forces you to coach if you had previously selected. Fix Command_Stop wiping out the last backup CVAR. Only drop a coach in if the coach values are empty, otherwise kick the player as we are at max capacity for the match. Add in add coach command. Convert auth to steam64 for coaches on add. Add in logic to restore and move coach if in the global value. Update coach targets based on join and .coach. Only one person can coach per match, no more swapping. Backups store coaches as well so this will be stored and updated on match restore. Add in coaches_per_team config (default 2). Update docs. Change g_TeamCoaches to ArrayList like player auths. Update teamjoin logic accordingly based on max coaches per team. Equality check fix. Length isn't zero indexed. Rebase. Add one more debug call for last backup file. Add in check for stop command in debug. Include a GoBack for the Coach KV pair. Without this, the structure was incomplete and you would not be able to restore on first round. Adjust Command_Stop to use local commands. Removes an async call that is possibly cause some issues during a round restore. Fix pausing after round restore if users have fixed timeouts.
Update example match to include 5 players per team instead of 1.
df5b2a7
to
70b9ff6
Compare
Coaches now properly lock in teams.
Fixes #471 |
Per suggestion, move the steamAuth and check after the check. Add in a check for playerTeam, first check the team, then the coach. Should return none if neither exist.
9838556
to
a5007b2
Compare
Attempt to just override the Valve Backup coach restore and insert our own timer. See if this works since restoring on first valve backup seems to not work if a user exists in a disconnected state, causing them to call `.coach` again.
Remove warmup calls and use our own coach placement logic. This avoids any issues with Valve backups not respecting coaches when a client disconnects. Add in WriteBackup() calls for edge cases on coaches joining and immediately calling !stop for free 16k.
Per #699 there is an issue during match restores either using
get5_loadbackup
or!stop
in chat. Once the match is restored, a coach is dropped onto the team, and unable to.coach
back. Maybe there was a change to the coaching mechanism in CS:GO, but this fix simply allows users to use.coach
In freeze time, as was intended by the looks of it from the comments?Thanks!