PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

UI: server browser shows wrong player count #68

Closed kai-li-wop closed 3 years ago

kai-li-wop commented 3 years ago

Just some feedback on the server browser. I've tried this on all 3 PC's i have WoP on. This server currently says it has 7 players when it has 9 was 6 before i joined, then I found out that there was 8 on - (9 in total with me included) only seems to be PadWorld server with this issue. ~Ben the PadKing

Same problem here. It said 8 players on while 10 players were on the server actually. ~Adri{HUN} unknown

You are right, Monster Browser says 8 humans, WoP ingame server list says 6 humans right now. ~Kai-Li

Maybe some calculations are off in regards to sv_privateClients or g_maxGameClients. One can reserve slots for admins and players. ~brain

mgerhardy commented 3 years ago

Reference for myself: The relevant parts are in SVC_Info (g_humanplayers)

mgerhardy commented 3 years ago

The monster browser counts humans by looping over the ping of the connected players. If it is != 0 is counts as a human. The solution we are using (see 0a6f8739998d56563341f8b6c87066bf3b8163b7 ) handles this a little bit different. It takes the remote address type into account - which is even more correct imo. We need a test server with a few real players on...

mgerhardy commented 3 years ago

There is also this rev https://github.com/PadWorld-Entertainment/wop-gamesource-svn/commit/92efffa442650ec7711b227a36236baa028a0f0b

robo9k commented 3 years ago

One can just start a dedicated server locally and connect to it multiple times. Which is when you'd usually get a ping < 5. You can also get a ping < 5 online if your actual ping is low and you use cl_timeNudge.

mgerhardy commented 3 years ago

As brain said, this is most likely related to sv_privateClients?

    // if "sv_privateClients" is set > 0, then that number
    // of client slots will be reserved for connections that
    // have "password" set to the value of "sv_privatePassword"
    // Info requests will report the maxclients as if the private
    // slots didn't exist, to prevent people from trying to connect
    // to a full server.
    // This is to allow us to reserve a couple slots here on our
    // servers so we can play without having to kick people.

See the attached pull request