From: Holger Schemel Date: Wed, 6 Jun 2018 06:28:10 +0000 (+0200) Subject: fixed re-opening request door after stopping network game X-Git-Tag: 4.1.1.0~120 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a71a2ef6b05438e43b6c4f8d475a3010e43b9beb;p=rocksndiamonds.git fixed re-opening request door after stopping network game --- diff --git a/src/network.c b/src/network.c index 1c9e0b0d..4b625758 100644 --- a/src/network.c +++ b/src/network.c @@ -544,12 +544,13 @@ static void Handle_OP_STOP_PLAYING() if (game_status == GAME_MODE_PLAYING) { - if (buffer[2] == NETWORK_STOP_BY_PLAYER) - Request("Network game stopped by player!", REQ_CONFIRM); - else if (buffer[2] == NETWORK_STOP_BY_ERROR) - Request("Network game stopped due to internal error!", REQ_CONFIRM); - else - Request("Network game stopped!", REQ_CONFIRM); + 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!"); + + Request(message, REQ_CONFIRM | REQ_STAY_CLOSED); } SetGameStatus(GAME_MODE_MAIN);