MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Receive_SERVER_SHUTDOWN

Method Receive_SERVER_SHUTDOWN

src/network/network_client.cpp:1061–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1059}
1060
1061NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet &)
1062{
1063 Debug(net, 9, "Client::Receive_SERVER_SHUTDOWN()");
1064
1065 /* Only when we're trying to join we really
1066 * care about the server shutting down. */
1067 if (this->status >= STATUS_JOIN) {
1068 ShowErrorMessage(GetEncodedString(STR_NETWORK_MESSAGE_SERVER_SHUTDOWN), {}, WL_CRITICAL);
1069 }
1070
1071 if (this->status == STATUS_ACTIVE) ClientNetworkEmergencySave();
1072
1073 return NETWORK_RECV_STATUS_SERVER_ERROR;
1074}
1075
1076NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_NEWGAME(Packet &)
1077{

Callers

nothing calls this directly

Calls 3

ShowErrorMessageFunction · 0.85
GetEncodedStringFunction · 0.50

Tested by

no test coverage detected