MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / updateQueryProgress

Function updateQueryProgress

Engine/source/app/net/serverQuery.cpp:1478–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1476//-----------------------------------------------------------------------------
1477
1478static void updateQueryProgress()
1479{
1480 if ( gPingList.size() )
1481 return;
1482
1483 char msg[64];
1484 U32 queriesLeft = gQueryList.size();
1485 dSprintf( msg, sizeof( msg ), "Querying servers: %d left...", queriesLeft );
1486
1487 // Query progress is 0.5 -> 1
1488 F32 progress = 0.5f;
1489 if ( gServerQueryCount )
1490 progress += ( F32( gServerQueryCount - queriesLeft ) / F32( gServerQueryCount * 2 ) );
1491
1492 //Con::errorf( ConsoleLogEntry::General, "Query progress - %d of %d left - progress = %.2f", queriesLeft, gServerQueryCount, progress );
1493 Con::executef( "onServerQueryStatus", "query", msg, Con::getFloatArg( progress ) );
1494}
1495
1496
1497//-----------------------------------------------------------------------------

Callers 2

updatePingProgressFunction · 0.85
handleGameInfoResponseFunction · 0.85

Calls 4

dSprintfFunction · 0.85
executefFunction · 0.85
getFloatArgFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected