Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003992Doomseeker[All Projects] Bugpublic2022-04-12 21:182022-05-04 15:18
ReporterZalewa 
Assigned ToZalewa 
PrioritynormalSeverityminorReproducibilityrandom
Statusneeds reviewResolutionopen 
PlatformOSOS Version
Product Version1.3.3 
Target VersionFixed in Version 
Summary0003992: Zandronum plugin: awkward ping calculation for servers can bug out
DescriptionZandronum plugins rely on the server launcher protocol to calculate the ping. The current time is retrieved in a buggy way from the ZandronumServer::millisecondTime() method, sent to the server in the query challenge, then retrieved back from the server's query reply, then compared again to ZandronumServer::millisecondTime() to determine the server's ping.

This can bug out when:

1. The computer or the user adjusts the time.
2. The time on the computer changes from 23:59:59 to 00:00:00 of the next day.
3. The server decides to play a trick on us and send back a random value.

Moreover, the ZandronumServer::millisecondTime() is bugged itself because there's one 0 missing when multiplying the hour by the amount of milliseconds.
Additional InformationDoomseeker already has a generic way to set the server's ping. There's no need to rely on the Zandronum's Launcher protocol mechanism.

Zandronum server launcher protocol offers a Long field to pass the time around:

> Long Time Current time, this will be sent back to you so you can determine ping.

https://wiki.zandronum.com/Launcher_protocol [^]
Attached Filespng file icon ds_zandronum_negative_ping.png [^] (4,149 bytes) 2022-04-12 21:20

- Relationships

-  Notes
User avatar (0022190)
Zalewa (developer)
2022-04-12 21:19

Let's just remove the custom Zandronum code, send all zeros in the "Long Time" query field, and just rely on Doomseeker's built-in method of determining ping, which is based on the monotonic clock of QElapsedTimer.
User avatar (0022203)
Zalewa (developer)
2022-05-02 17:23

The awkard feature got ctrl+x'd

https://bitbucket.org/Doomseeker/doomseeker/commits/a97b6c37965f4dadcc88da80705ca5d98b94442d [^]
User avatar (0022205)
WubTheCaptain (developer)
2022-05-03 22:51
edited on: 2022-05-03 22:57

The core codebase no longer has calls to setPing and setPingIsSet functions, after this change. Some things change d->ping and d->bPingIsSet directly, without the function callback. There are code comments like in Server::refreshStops referring to plugins potentially setting the ping. Are these functions going to be deprecated?

User avatar (0022211)
Zalewa (developer)
2022-05-04 15:18

Quote
Are these functions going to be deprecated?

No.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2022-04-12 21:18 Zalewa New Issue
2022-04-12 21:19 Zalewa Note Added: 0022190
2022-04-12 21:20 Zalewa File Added: ds_zandronum_negative_ping.png
2022-05-02 17:00 Zalewa Assigned To => Zalewa
2022-05-02 17:00 Zalewa Status new => assigned
2022-05-02 17:23 Zalewa Note Added: 0022203
2022-05-02 17:23 Zalewa Status assigned => needs testing
2022-05-03 22:51 WubTheCaptain Note Added: 0022205
2022-05-03 22:57 WubTheCaptain Note Edited: 0022205 View Revisions
2022-05-03 22:58 WubTheCaptain Status needs testing => needs review
2022-05-04 15:18 Zalewa Note Added: 0022211






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker