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

Discrepancy between server-side and client-side SW clock #1780

Open
rmarquis opened this issue Oct 14, 2021 · 0 comments
Open

Discrepancy between server-side and client-side SW clock #1780

rmarquis opened this issue Oct 14, 2021 · 0 comments
Labels
🐞 Bug Something isn't working cat: mod Category mod (generic) P3: Normal Priority 3
Milestone

Comments

@rmarquis
Copy link
Contributor

rmarquis commented Oct 14, 2021

In SW mode, the console will print some clock information after each round, such as:

  • Clock set to: 12:34 (1st round)
  • Objective reached at 12:12 (original: 12:34) or Objective NOT reached in time (12:34) (2nd round)

While working on #495, I observed a weird discrepancy between the clock calculation in SW mode when the time difference between the 2 rounds is typically small.

Here's a screenshot to illustrate, with some debug values:

  • display the delta time in msec (would otherwise be shown as 0:00)
  • [original time][original time in msec][actual time][actual time in msec]

shot0001

The server time (in console) displays Objective NOT reached in time (allies failed), while the client side shows that allies won the game (set by CS_MULTI_MAPWINNER).

Notes:

  • changes in show delta time in debriefing in stopwatch mode #495 only display the time, but do not modify how the winning side is computed. This looks like a vanilla issue.
  • the time used for delta time display are computed on the server
  • delta time is surprisingly displayed as a negative number, which indicates it is the client side that is wrong (as opposed to some error due to int/float rounding on the console message)
  • when displayed in msec, time is a multiple of 50 msec, due to 1/sv_fps default value I guess

Lastly, I am not sure of the range of time that results in such discrepancy (the lowest delta time I got while testing that was good was 1300msec, but I got some discrepancy with -350 msec too). But at first sight, I'd say around ~1 sec, maybe less).

@rmarquis rmarquis added 🐞 Bug Something isn't working P3: Normal Priority 3 cat: mod Category mod (generic) labels Oct 14, 2021
@rmarquis rmarquis added this to the 2.79 milestone Oct 14, 2021
@jackeri jackeri modified the milestones: 2.79, 2.80 Dec 23, 2021
@Aranud Aranud modified the milestones: 2.80, Future Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working cat: mod Category mod (generic) P3: Normal Priority 3
Projects
None yet
Development

No branches or pull requests

3 participants