From: Holger Schemel Date: Sun, 1 Jul 2018 11:18:43 +0000 (+0200) Subject: added showing player number if network game was stopped by remote player X-Git-Tag: 4.1.1.0~92 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d5a1ec86f68d4b1bf514d60f2245c1894f7295a9;p=rocksndiamonds.git added showing player number if network game was stopped by remote player --- diff --git a/src/network.c b/src/network.c index c4e2ee6e..010e8b33 100644 --- a/src/network.c +++ b/src/network.c @@ -659,11 +659,13 @@ static void Handle_OP_STOP_PLAYING() int index_nr = client_nr - 1; 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 ? - "Network game stopped due to internal error!" : - "Network game stopped!"); + char message[100]; + + sprintf(message, (buffer[2] == NETWORK_STOP_BY_PLAYER ? + "Network game stopped by player %d!" : + buffer[2] == NETWORK_STOP_BY_ERROR ? + "Network game stopped due to internal error!" : + "Network game stopped!"), client_nr); if (buffer[2] != NETWORK_STOP_BY_PLAYER || stopped_by_remote_player) Request(message, REQ_CONFIRM | REQ_STAY_CLOSED);