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

Only increment timer and record replays if movement processing happens, fix abuse with zones and low fps/high packet loss #371

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

zer0k-z
Copy link
Contributor

@zer0k-z zer0k-z commented Oct 3, 2022

The first issue is an unique problem with KZ. Timer is incremented upon every OnPlayerRunCmdPost call instead of PostThink like bhop/surf does, even if the command is completely disregarded by the server. This means the timer can get wrongfully incremented like this example: https://youtu.be/hVqcXVs3Ug0
The replay change is to accommodate this timer change.

The second issue involves the player starting their timer very far away from the start zone trigger. This happens because the function responsible for leaving triggers, EntityUntouch, is only called at the end of server frame instead of on PostThink. When multiple client packets are processed at once (due to lag/low fps), the trigger's EndTouch output is called too late. I ported EndTouchFix to GOKZ in order to prevent this from happening. This fix should also prevent player from being able to start the timer after teleporting out of start zone.

This means a few courses (probably only bonuses) need wiping (at least from the top times), since it will contain times that are no longer possible to obtain.

The current list is as follows:

  • kz_burnished B1
  • kz_lionheart B1
  • skz_map B1

@zer0k-z zer0k-z changed the title Only increment timer and record replays if movement processing happens, fix abuse with zones and low fps Only increment timer and record replays if movement processing happens, fix abuse with zones and low fps/high packet loss Nov 21, 2022
Copy link
Collaborator

@zealain zealain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for @GameChaos to port this to KZTimer before I merge.

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.

2 participants