X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fnetwork.c;h=1a0feda699008b9eaf90d9b937f7ed447e8f2f49;hb=852a8eef1e8858a40da0be4093eba3deaf468f51;hp=1733aba93441a77d164937e9bccee05a7257f0d5;hpb=f7704e2d22e9499efe6380e0c916c2bd4918e4be;p=rocksndiamonds.git diff --git a/src/network.c b/src/network.c index 1733aba9..1a0feda6 100644 --- a/src/network.c +++ b/src/network.c @@ -1,7 +1,7 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-2002 Artsoft Entertainment * +* (c) 1995-2006 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -431,18 +431,11 @@ static void Handle_OP_NUMBER_WANTED() } else if (old_client_nr == first_player.nr) /* failed -- local player? */ { -#if 0 - char *color[] = { "yellow", "red", "green", "blue" }; -#endif char request[100]; -#if 1 sprintf(request, "Sorry ! Player %d already exists ! You are player %d !", index_nr_wanted + 1, new_index_nr + 1); -#else - sprintf(request, "Sorry ! %s player still exists ! You are %s player !", - color[index_nr_wanted], color[new_index_nr]); -#endif + Request(request, REQ_CONFIRM); Error(ERR_NETWORK_CLIENT, "cannot switch -- you keep client # %d", @@ -599,19 +592,14 @@ static void Handle_OP_MOVE_PLAYER(unsigned int len) if (server_frame_counter != FrameCounter) { - Error(ERR_RETURN, "client and servers frame counters out of sync"); - Error(ERR_RETURN, "frame counter of client is %d", FrameCounter); - Error(ERR_RETURN, "frame counter of server is %d", server_frame_counter); - -#if 1 - Error(ERR_RETURN, "this should not happen -- please debug"); + Error(ERR_INFO, "client and servers frame counters out of sync"); + 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"); stop_network_game = TRUE; return; -#else - Error(ERR_EXIT, "this should not happen -- please debug"); -#endif } /* copy valid player actions */ @@ -638,7 +626,7 @@ static void HandleNetworkingMessages() nread -= 4 + message_length; memmove(readbuffer, readbuffer + 4 + message_length, nread); - switch(buffer[1]) + switch (buffer[1]) { case OP_BAD_PROTOCOL_VERSION: Handle_OP_BAD_PROTOCOL_VERSION();