MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / msg_wait_resync

Function msg_wait_resync

Source/msg.cpp:2436–2466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2434}
2435
2436bool msg_wait_resync()
2437{
2438 bool success;
2439
2440 GetNextPacket();
2441 sgbDeltaChunks = 0;
2442 sgnCurrMegaPlayer = -1;
2443 sgbRecvCmd = CMD_DLEVEL_END;
2444 gbBufferMsgs = 1;
2445 sgdwOwnerWait = SDL_GetTicks();
2446 success = UiProgressDialog(WaitForTurns);
2447 gbBufferMsgs = 0;
2448 if (!success) {
2449 FreePackets();
2450 return false;
2451 }
2452
2453 if (gbGameDestroyed) {
2454 UiErrorOkDialog(PROJECT_NAME, _("The game ended"), /*error=*/false);
2455 FreePackets();
2456 return false;
2457 }
2458
2459 if (sgbDeltaChunks != MAX_CHUNKS) {
2460 UiErrorOkDialog(PROJECT_NAME, _("Unable to get level data"), /*error=*/false);
2461 FreePackets();
2462 return false;
2463 }
2464
2465 return true;
2466}
2467
2468void run_delta_info()
2469{

Callers 1

NetInitFunction · 0.85

Calls 4

GetNextPacketFunction · 0.85
UiProgressDialogFunction · 0.85
FreePacketsFunction · 0.85
UiErrorOkDialogFunction · 0.85

Tested by

no test coverage detected