Skip to content
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

Bring in check to not allow users the ability to unpause admin pauses. #767

Merged
merged 12 commits into from
Jul 7, 2022

Conversation

PhlexPlexico
Copy link
Collaborator

Closes #737

Largely untested, so would need someone to confirm this works as intended, but I believe it should be default be false and the only way to really trigger it would be console pausing.

@nickdnk
Copy link
Collaborator

nickdnk commented Jul 2, 2022

I would recommend putting the variable reset inside the Unpause() helper method to ensure it always gets set to false, also if we move code around down the line.

@nickdnk
Copy link
Collaborator

nickdnk commented Jul 3, 2022

@PhlexPlexico Current PR does not reset the variable at all. I think you forgot to add it to the utility function?

  1. Reset it to false when the game is paused by non-admin (so that it gets reset even if there is a pause followed by a changelevel and hence no call to Unpause).
  2. Reset it to false in the Unpause utility function.

@PhlexPlexico
Copy link
Collaborator Author

Hey sorry about that, guess I missed saving the util file when committing my changes to git. It should be good to go now, I've included back the setting g_PausedByAdmin to false after the client checks, and made sure the util class was actually included this time with the proper change. Lemme know if I've missed anything else, sorry about that!

@PhlexPlexico
Copy link
Collaborator Author

image

Looks like this is working as intended. I think we should be good to merge this in. One was paused via RCON to the server, and then once by users.

@nickdnk
Copy link
Collaborator

nickdnk commented Jul 7, 2022

Alright. g_InExtendedPause means what exactly? Is this just a tech pause? Because if so, I say we rename it.

Remove amibiguous extended pause and introduce new enums for pause types.
This is to ensure that it doesn't get fired off anywhere else.

Also include a check to make sure a user isn't calling Pause with the None PauseType.
… a type.

Remove duplicate ServerCommand since it appears in both clauses of if statement.
translations/get5.phrases.txt Outdated Show resolved Hide resolved
@nickdnk nickdnk merged commit 9250c82 into splewis:master Jul 7, 2022
@PhlexPlexico PhlexPlexico deleted the admin-pause-fix branch July 8, 2022 18:12
@nickdnk nickdnk added this to the 0.9 milestone Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Stop players' ability to un-pause the game when paused by admin
2 participants