Prevent relogging to avoid respawn timers #1068
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
RespawnOptions
out of abstractState
to abstractSpawning
class (only children of this need it).Dead
toSpawning
(so logic can be used in both locationsDead
andJoining
).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]