MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ServerTimedOut

Function ServerTimedOut

Descent3/multi_client.cpp:293–308  ·  view source on GitHub ↗

Returns 1 if the server is gone!

Source from the content-addressed store, hash-verified

291
292// Returns 1 if the server is gone!
293int ServerTimedOut() {
294 // Don't check for a non-connected player
295 if (!(NetPlayers[Player_num].flags & NPF_CONNECTED))
296 return 0;
297
298 if (!nw_CheckReliableSocket(NetPlayers[Player_num].reliable_socket)) {
299 mprintf(0, "Reliable connection to the server was broken. Disconnecting.\n");
300 ShowProgressScreen(TXT_RELIABLE_OVERRUN);
301 Sleep(1000);
302 return 1;
303 }
304 if ((timer_GetTime() - Netgame.last_server_time) > SERVER_DISCONNECT_TIME)
305 return 1;
306
307 return 0;
308}
309#define NET_CLIENT_GAMETIME_REQ_TIMEOUT 10
310#define NET_CLIENT_GAMETIME_REQ_RETRY 1
311float First_gametime_req = 0;

Callers 1

MultiDoClientFrameFunction · 0.85

Calls 3

nw_CheckReliableSocketFunction · 0.85
ShowProgressScreenFunction · 0.85
SleepFunction · 0.50

Tested by

no test coverage detected