DEADSOFTWARE

Added teammate indication
[d2df-sdl.git] / src / game / g_game.pas
index df45196b1e0b168175efb8de36681b85041e1888..b89b03736ce7c8d0f7b62425729ff69d3a3e856b 100644 (file)
@@ -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
@@ -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
@@ -3668,7 +3667,13 @@ begin
   renderMapInternal(-c, -d, true);
 
   if (gGameSettings.GameMode <> GM_SINGLE) and gPlayerIndicator then
-    p.DrawIndicator();
+    if gPlayers[i] <> nil then
+      for i := 0 to High(gPlayers) do
+        if gPlayers[i] = p then gPlayers[i].DrawIndicator(_RGB(255, 255, 255))
+        else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE)
+        then
+          gPlayers[i].DrawIndicator(gPlayers[i].GetColor);
+
   if p.FSpectator then
     e_TextureFontPrintEx(p.GameX + PLAYER_RECT_CX - 4,
                          p.GameY + PLAYER_RECT_CY - 4,