X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=2084d8876e43323c661c78b7f741a01567defe89;hb=7d53b8719f818712900fefb1c36e41b1fe9b3f32;hp=df45196b1e0b168175efb8de36681b85041e1888;hpb=fe124e7198cf5515dc005ed363c7989e19228134;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index df45196..2084d88 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -2131,7 +2130,7 @@ begin begin if (NetMHost = nil) or (NetMPeer = nil) then begin - if not g_Net_Slist_Connect then g_Console_Add(_lc[I_NET_MSG_ERROR] + _lc[I_NET_SLIST_ERROR]); + g_Net_Slist_Connect(false); // non-blocking connection to the master end; g_Net_Slist_Update; @@ -3512,7 +3511,7 @@ end; procedure DrawPlayer(p: TPlayer); var - px, py, a, b, c, d: Integer; + px, py, a, b, c, d, i: Integer; //R: TRect; begin if (p = nil) or (p.FDummy) then @@ -3667,8 +3666,21 @@ begin renderMapInternal(-c, -d, true); - if (gGameSettings.GameMode <> GM_SINGLE) and gPlayerIndicator then - p.DrawIndicator(); + if (gGameSettings.GameMode <> GM_SINGLE) and (gPlayerIndicator > 0) then + case gPlayerIndicator of + 1: + p.DrawIndicator(_RGB(255, 255, 255)); + + 2: + for i := 0 to High(gPlayers) do + if gPlayers[i] <> nil then + if gPlayers[i] = p then p.DrawIndicator(_RGB(255, 255, 255)) + else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE) then + if gPlayerIndicatorStyle = 1 then + gPlayers[i].DrawIndicator(_RGB(192, 192, 192)) + else gPlayers[i].DrawIndicator(gPlayers[i].GetColor); + end; + if p.FSpectator then e_TextureFontPrintEx(p.GameX + PLAYER_RECT_CX - 4, p.GameY + PLAYER_RECT_CY - 4, @@ -4876,9 +4888,10 @@ begin if NetUseMaster then begin if (NetMHost = nil) or (NetMPeer = nil) then - if not g_Net_Slist_Connect then - g_Console_Add(_lc[I_NET_MSG_ERROR] + _lc[I_NET_SLIST_ERROR]); - + begin + // let the connection be blocking here, why not? + g_Net_Slist_Connect(); + end; g_Net_Slist_Update; end; @@ -5489,9 +5502,7 @@ begin if g_Game_IsServer and g_Game_IsNet then if NetUseMaster then begin - if NetMPeer = nil then - if not g_Net_Slist_Connect() then - g_Console_Add(_lc[I_NET_MSG_ERROR] + _lc[I_NET_SLIST_ERROR]); + if NetMPeer = nil then g_Net_Slist_Connect(); g_Net_Slist_Update(); end else