Fix tinting of AI kills counter
authorunc0rr
Thu, 20 Feb 2014 00:28:49 +0400
changeset 10147 9a772dc5dfbe
parent 10146 1fb6d8cc4626
child 10148 a599593e1dc2
Fix tinting of AI kills counter
hedgewars/uGearsHedgehog.pas
hedgewars/uWorld.pas
--- a/hedgewars/uGearsHedgehog.pas	Wed Feb 19 19:10:11 2014 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Thu Feb 20 00:28:49 2014 +0400
@@ -1346,7 +1346,6 @@
 procedure doStepHedgehog(Gear: PGear);
 var tX: hwFloat;
 begin
-AddFileLog('[HOG] -#' + inttostr(Gear^.uid) + ': ' + floattostr(Gear^.X) + ', ' + floattostr(Gear^.Y) + ' (' + floattostr(Gear^.dX) + ', ' + floattostr(Gear^.dY) + ')');
 CheckGearDrowning(Gear);
 if Gear = nil then exit;
 tX:= Gear^.X;
@@ -1390,7 +1389,6 @@
         else
             doStepHedgehogDriven(Gear)
     end;
-AddFileLog('[HOG] +#' + inttostr(Gear^.uid) + ': ' + floattostr(Gear^.X) + ', ' + floattostr(Gear^.Y) + ' (' + floattostr(Gear^.dX) + ', ' + floattostr(Gear^.dY) + ')');
 end;
 
 end.
--- a/hedgewars/uWorld.pas	Wed Feb 19 19:10:11 2014 +0400
+++ b/hedgewars/uWorld.pas	Thu Feb 20 00:28:49 2014 +0400
@@ -1356,20 +1356,27 @@
                 Tint($FF,$FF,$FF,$80)
             else untint;
 
-            if OwnerTex <> nil then
-                begin
-                r.x:= 2;
-                r.y:= 2;
-                r.w:= OwnerTex^.w - 4;
-                r.h:= OwnerTex^.h - 4;
-                DrawTextureFromRect(-OwnerTex^.w - NameTagTex^.w - 16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, OwnerTex)
-                end;
             // draw name
             r.x:= 2;
             r.y:= 2;
             r.w:= NameTagTex^.w - 4;
             r.h:= NameTagTex^.h - 4;
             DrawTextureFromRect(-NameTagTex^.w - 14, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, NameTagTex);
+
+            if OwnerTex <> nil then
+                begin
+                r.w:= OwnerTex^.w - 4;
+                r.h:= OwnerTex^.h - 4;
+                DrawTextureFromRect(-OwnerTex^.w - NameTagTex^.w - 16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, OwnerTex)
+                end;
+
+            if (GameFlags and gfAISurvival) <> 0 then
+                begin
+                r.w:= AIKillsTex^.w - 4;
+                r.h:= AIKillsTex^.h - 4;
+                DrawTextureFromRect(TeamHealthBarWidth + 24, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, AIKillsTex);
+                end;
+
             // draw flag
             r.w:= 22;
             r.h:= 15;