RoyDefined / WebDoomer

WebDoomer is a fast and efficient Zandronum and QZandronum server browser as a web app.
GNU General Public License v3.0
4 stars 0 forks source link

Bots show their ping even though this does not apply #6

Closed RoyDefined closed 6 months ago

RoyDefined commented 7 months ago

Describe the bug Bots show their ping when you look at server details even though this will always be 0.

The main issue is that ping is fetched and returned as 0 here: https://github.com/RoyDefined/WebDoomer/blob/09e2beb63d585c1cee263d337416b754a138851f/src/WebDoomer/WebDoomer/Services/Zandronum/Server/Builder/ServerResultBuilder.cs#L307

Then when the final result is created there should be a check if the player is a bot, in which case ping is set as null rather than 0: https://github.com/RoyDefined/WebDoomer/blob/09e2beb63d585c1cee263d337416b754a138851f/src/WebDoomer/WebDoomer/Services/Zandronum/Server/Response/ServerResult.cs#L119

Should the front end complain about ping being null, then this should also be changed so that this is allowed.

Steps to reproduce N/A

Expected behavior Ping should not be shown at all.

Screenshots N/A

Additional context N/A

RoyDefined commented 6 months ago

Fixed in 4b7f2e0.