hedgewars/uGears.pas
changeset 3773 f552c7b439fa
parent 3770 f54e8cb9a12b
child 3775 c0397452e7c5
--- a/hedgewars/uGears.pas	Thu Aug 26 14:32:29 2010 +0100
+++ b/hedgewars/uGears.pas	Thu Aug 26 14:46:30 2010 +0100
@@ -1549,7 +1549,11 @@
     gear^.dX := _0;
     gear^.dY := _0;
     gear^.State := gstWait;
-    inc(CurrentHedgehog^.Team^.stats.AIKills);
+    with CurrentHedgehog^ do begin
+        inc(Team^.stats.AIKills);
+        if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);
+        Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16);
+    end;
     FindPlace(gear, false, 0, LAND_WIDTH); 
     RenderHealth(PHedgehog(gear^.Hedgehog)^);
     RecountTeamHealth(PHedgehog(gear^.Hedgehog)^.Team);