fixed showing message request if local player stopped network game (finally)
authorHolger Schemel <info@artsoft.org>
Sun, 17 Jun 2018 10:26:02 +0000 (12:26 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 18 Jun 2018 17:47:32 +0000 (19:47 +0200)
With the previous fix (see commit with same commit message) for this
problem, the message request was still shown if the local player was
remapped to a different player in the actual level.

src/network.c

index 0e5955c62e103ebac1681c9f4ff9822437a77344..2bbdf6b18b1277c576258cee3982775f379e858b 100644 (file)
@@ -541,7 +541,8 @@ static void Handle_OP_STOP_PLAYING()
   {
     int client_nr = buffer[0];
     int index_nr = client_nr - 1;
-    boolean stopped_by_remote_player = (index_nr != local_player->index_nr);
+    struct PlayerInfo *client_player = &stored_player[index_nr];
+    boolean stopped_by_remote_player = (!client_player->connected_locally);
     char *message = (buffer[2] == NETWORK_STOP_BY_PLAYER ?
                     "Network game stopped by player!" :
                     buffer[2] == NETWORK_STOP_BY_ERROR ?