Author Topic: The % next to ping in server status  (Read 567 times)

Volki

  • Hydlaa Notable
  • *
  • Posts: 877
    • View Profile
The % next to ping in server status
« on: August 24, 2017, 09:08:00 pm »
Why is there a % sign in the server ping on the login screen of the game?

It's been like this for as far as I can remember, but no one's ever commented on it. I'd like to know why it sometimes displays as a percentage when it's obviously not a percentage.
Lace dark dreadfull power inside him awakens now fully resultin his former self comin back lord of dark noble house shantae of mevango family lacertus shadowone mevango also knowed as darkblade of shadows

cdmoreland

  • Hydlaa Citizen
  • *
  • Posts: 472
  • Main: Waesed Waesech
    • View Profile
    • Ad Libertatem
Re: The % next to ping in server status
« Reply #1 on: August 24, 2017, 09:22:03 pm »
Not on mine. I'm running win64 version.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: The % next to ping in server status
« Reply #2 on: August 25, 2017, 01:20:53 am »
It will be related to packet loss. I saw a percentage often in times when the server was quite unstable and rebooted, so several pings remained unanswered. You can test it by temporarily disabling your network connection. The percent sign should probably be hidden until any loss actually happens.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Dilihin

  • Hydlaa Citizen
  • *
  • Posts: 296
  • you can always find me on IRC: JeHugawa @freenode
    • View Profile
Re: The % next to ping in server status
« Reply #3 on: August 25, 2017, 10:52:14 am »
If we look at the  source code at client/gui/pawsloginwindow.cpp at function void pawsLoginWindow::Draw() we can see it indeed is package loss as LigH said. Here's mostly the relevant part of the code (starting from line 554)

Code: [Select]
void pawsLoginWindow::Draw()
{
    // Check timeout
    if(connecting && csGetTicks() >= timeout)
    {
        psengine->GetNetManager()->Disconnect();
        ConnectionFailed();
        PawsManager::GetSingleton().CreateWarningBox(PawsManager::GetSingleton().Translate("The server is not running or is not reachable.  Please check the website or forums for more info."));
    }

    csString pingStr;

    for (size_t i=0; i < servers.GetSize(); i++)
    {
        servers[i]->DoYourWork();

        int ping = servers[i]->GetPing();
        int loss = (int)(servers[i]->GetLoss()*100.0f);
       
        switch (servers[i]->GetStatus())
        {
        case psServerPinger::INIT:
            pingStr.Clear();
            break;
        case psServerPinger::FAILED:
            pingStr = PawsManager::GetSingleton().Translate("Failed");
            break;
        case psServerPinger::FULL:
            pingStr = PawsManager::GetSingleton().Translate("Full");
            break;
        case psServerPinger::READY:
            if (loss == 100)
                pingStr = PawsManager::GetSingleton().Translate("Failed");
            else if (loss)
                pingStr.Format("%d %d%%",ping,loss);
            else
                pingStr.Format("%d",ping);
            break;
        case psServerPinger::LOCKED:
            pingStr = PawsManager::GetSingleton().Translate("Locked");
            break;
        case psServerPinger::WAIT:
            pingStr = PawsManager::GetSingleton().Translate("Wait");
            break;
        default:
            pingStr = PawsManager::GetSingleton().Translate("Error");
            break;
        }

        listBox->SetTextCellValue((int)i, 2, pingStr);
    }

    pawsWidget::Draw();
}

Volki

  • Hydlaa Notable
  • *
  • Posts: 877
    • View Profile
Re: The % next to ping in server status
« Reply #4 on: August 25, 2017, 03:40:21 pm »
So, what's the point of displaying it? No player should need to see that.
Lace dark dreadfull power inside him awakens now fully resultin his former self comin back lord of dark noble house shantae of mevango family lacertus shadowone mevango also knowed as darkblade of shadows

Dilihin

  • Hydlaa Citizen
  • *
  • Posts: 296
  • you can always find me on IRC: JeHugawa @freenode
    • View Profile
Re: The % next to ping in server status
« Reply #5 on: August 25, 2017, 09:07:37 pm »
It's actually very usefull but not going too deep atm as i'm tired, but it can help people realize why they cant play well.

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: The % next to ping in server status
« Reply #6 on: August 28, 2017, 01:38:10 am »
Packet loss can make moving characters in the world appear like jumping around (up to your client getting a warning by anti-cheat code discovering unusual acceleration, if that is still working at all), make you miss parts of a conversation, unexpectedly die in combat, even disconnect you more or less frequently.

Reasons can range from a faulty network adapter (or broken wires to it) in your PC, internet router, or even up to mis-routing or other node misconfiguration by your internet provider; or, if you play with a wireless connection, possibly heavy interferences caused by e.g. aged DECT phones or microwave ovens. Also there was a time, long ago, when the game server software acted weird.

Knowing such statistical numbers is surely useful if above mentioned issues happen to you.
« Last Edit: August 28, 2017, 01:40:51 am by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty