X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fnetwork.c;h=b4ee83c37ae4d61da0b62567b835f041eede8a49;hb=65d710d4b2680becc1d1910b2e464f2f4e2201d4;hp=25108000ba44d12a0dd2d04925282b47a35d4cae;hpb=e227a361d63ac92e9ed1ceb276f739fa3edc45be;p=rocksndiamonds.git diff --git a/src/network.c b/src/network.c index 25108000..b4ee83c3 100644 --- a/src/network.c +++ b/src/network.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // network.c // ============================================================================ @@ -90,7 +90,7 @@ static void DrawNetworkTextExt(char *message, int font_nr, boolean initialize) ypos = SY + ypos_2; } - Error(ERR_DEBUG, "========== %s ==========", message); + Debug("network:client", "========== %s ==========", message); } else { @@ -104,7 +104,7 @@ static void DrawNetworkTextExt(char *message, int font_nr, boolean initialize) ypos += (num_lines_printed + num_lines_spacing) * font_height; - Error(ERR_DEBUG, "%s", message); + Debug("network:client", "%s", message); } BackToFront(); @@ -332,7 +332,7 @@ boolean ConnectToServer(char *hostname, int port) SDLNet_Write16(port, &ip.port); } - Error(ERR_DEBUG, "trying to connect to network server at %d.%d.%d.%d ...", + Debug("network:client", "trying to connect to network server at %d.%d.%d.%d ...", (server_host >> 24) & 0xff, (server_host >> 16) & 0xff, (server_host >> 8) & 0xff, @@ -505,8 +505,8 @@ static void Handle_OP_BAD_PROTOCOL_VERSION(void) int protocol_version_major = getNetworkBuffer8BitInteger(read_buffer); int protocol_version_minor = getNetworkBuffer8BitInteger(read_buffer); - Error(ERR_WARN, "protocol version mismatch"); - Error(ERR_WARN, "server expects %d.%d.x instead of %d.%d.%d", + Warn("protocol version mismatch"); + Warn("server expects %d.%d.x instead of %d.%d.%d", protocol_version_major, protocol_version_minor, PROTOCOL_VERSION_MAJOR, @@ -702,7 +702,7 @@ static void Handle_OP_START_PLAYING(void) if (!strEqual(new_leveldir_identifier, network_level.leveldir_identifier)) { - Error(ERR_WARN, "no such level identifier: '%s'", new_leveldir_identifier); + Warn("no such level identifier: '%s'", new_leveldir_identifier); stop_network_game = TRUE; @@ -808,11 +808,10 @@ static void Handle_OP_MOVE_PLAYER(void) if (server_frame_counter != FrameCounter) { - Error(ERR_INFO, "frame counters of client %d and server out of sync", - player_nr); - Error(ERR_INFO, "frame counter of client is %d", FrameCounter); - Error(ERR_INFO, "frame counter of server is %d", server_frame_counter); - Error(ERR_INFO, "this should not happen -- please debug"); + Warn("frame counters of client %d and server out of sync", player_nr); + Warn("frame counter of client is %d", FrameCounter); + Warn("frame counter of server is %d", server_frame_counter); + Warn("this should not happen -- please debug"); stop_network_game = TRUE;