X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftools.c;h=ec52e93e56816447bdf7d8d31c162c231f47f448;hb=882fd29e6ec1e0845a1d9903fc358760b95ab4d2;hp=b0773082c16981783208ab5c7c815a2b2790ea6e;hpb=dad6457f2f778d11ad84e90d328981532d0ba0ea;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index b0773082..ec52e93e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3530,9 +3530,12 @@ static void DrawNetworkPlayer(int x, int y, int player_nr, int tile_size, DrawText(x + xoffset_text, y + yoffset_text, player_name, font_nr); } -void DrawNetworkPlayers() +void DrawNetworkPlayersExt(boolean force) { - if (!network.enabled || !network.connected) + if (game_status != GAME_MODE_MAIN) + return; + + if (!network.connected && !force) return; int num_players = 0; @@ -3564,7 +3567,8 @@ void DrawNetworkPlayers() /* first draw local network player ... */ for (i = 0; i < MAX_PLAYERS; i++) { - if (stored_player[i].connected_locally) + if (stored_player[i].connected_network && + stored_player[i].connected_locally) { char *player_name = getNetworkPlayerName(i + 1); int player_width = xoffset_text + getTextWidth(player_name, font_nr); @@ -3593,6 +3597,16 @@ void DrawNetworkPlayers() } } +void DrawNetworkPlayers() +{ + DrawNetworkPlayersExt(FALSE); +} + +void ClearNetworkPlayers() +{ + DrawNetworkPlayersExt(TRUE); +} + inline static void DrawGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y, int graphic, int sync_frame, int mask_mode)