From: Holger Schemel Date: Wed, 6 Jun 2018 06:43:28 +0000 (+0200) Subject: fixed showing message request if local player stopped network game X-Git-Tag: 4.1.1.0~119 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=77ece4b955d08d19d0f05bf2d8241467a06d4bab;p=rocksndiamonds.git fixed showing message request if local player stopped network game --- diff --git a/src/network.c b/src/network.c index 4b625758..b55e68e7 100644 --- a/src/network.c +++ b/src/network.c @@ -544,13 +544,17 @@ static void Handle_OP_STOP_PLAYING() if (game_status == GAME_MODE_PLAYING) { + int client_nr = buffer[0]; + int index_nr = client_nr - 1; + boolean stopped_by_remote_player = (index_nr != local_player->index_nr); 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); + if (buffer[2] != NETWORK_STOP_BY_PLAYER || stopped_by_remote_player) + Request(message, REQ_CONFIRM | REQ_STAY_CLOSED); } SetGameStatus(GAME_MODE_MAIN);