MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / MPConnection_Fail

Function MPConnection_Fail

src/Server.c:255–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255static void MPConnection_Fail(const cc_string* reason) {
256 cc_string msg; char msgBuffer[STRING_SIZE * 2];
257 String_InitArray(msg, msgBuffer);
258 net_connecting = false;
259
260 String_Format2(&msg, "Failed to connect to %s:%i", &Server.Address, &Server.Port);
261 Game_Disconnect(&msg, reason);
262 OnClose();
263}
264
265static void MPConnection_FailConnect(cc_result result) {
266 static const cc_string reason = String_FromConst("You failed to connect to the server. It's probably down!");

Callers 2

MPConnection_FailConnectFunction · 0.85

Calls 3

String_Format2Function · 0.85
Game_DisconnectFunction · 0.85
OnCloseFunction · 0.85

Tested by

no test coverage detected