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

Prevent relogging to avoid respawn timers #1068

Merged
merged 1 commit into from
Oct 8, 2022
Merged

Conversation

Pugzy
Copy link
Contributor

@Pugzy Pugzy commented Oct 8, 2022

Apply respawn timers to players who leave to avoid the death process and respawn countdown. Players are leaving the server /hub or disconnect when they have died to avoid a respawn timer, if they can return to the match in less time than the death plus respawn timer would've taken then they have an advantage and can circumvent longer respawn timers.

An example under this new logic, if a player is killed and tries to leave to avoid a 10-second respawn timer, if they leave the server and return within 5 seconds they will be required to wait out the remaining 5 seconds before they respawn. If that same player leaves whilst they're falling in the void (or any other predicted death) they will be made to wait an extra 10 seconds to account for this.

image

  • Track the tick a player last died for use in joining respawning countdown.
  • Add 10 seconds to the tracked tick if a predicted death to account for combat logging (typically falling in to void).
  • Move RespawnOptions out of abstract State to abstract Spawning class (only children of this need it).
  • Move ticking countdown logic from Dead to Spawning (so logic can be used in both locations Dead and Joining).
  • Fix custom respawn message not having a color (brings back the green text).

Thanks to @Pablete1234 for assisting with these changes which were on a stale branch of mine from earlier this year.

Signed-off-by: Pugzy [email protected]

@Pugzy Pugzy requested a review from Electroid as a code owner October 8, 2022 14:52
@Electroid Electroid merged commit 0f62502 into PGMDev:dev Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants