--- 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);
--- a/hedgewars/uStore.pas Thu Aug 26 14:32:29 2010 +0100
+++ b/hedgewars/uStore.pas Thu Aug 26 14:46:30 2010 +0100
@@ -259,6 +259,8 @@
FlagTex:= Surface2Tex(texsurf, false);
SDL_FreeSurface(texsurf);
+ AIKillsTex := RenderStringTex(inttostr(stats.AIKills), Clan^.Color, fnt16);
+
dec(drY, r.h + 2);
DrawHealthY:= drY;
for i:= 0 to 7 do
--- a/hedgewars/uTeams.pas Thu Aug 26 14:32:29 2010 +0100
+++ b/hedgewars/uTeams.pas Thu Aug 26 14:46:30 2010 +0100
@@ -63,6 +63,7 @@
CrosshairTex,
GraveTex,
HealthTex,
+ AIKillsTex,
FlagTex: PTexture;
Flag: shortstring;
GraveName: shortstring;
--- a/hedgewars/uWorld.pas Thu Aug 26 14:32:29 2010 +0100
+++ b/hedgewars/uWorld.pas Thu Aug 26 14:46:30 2010 +0100
@@ -782,7 +782,7 @@
// draw ai kill counter for gfAISurvival
if (GameFlags and gfAISurvival) <> 0 then begin
DrawTexture(TeamHealthBarWidth + 22, cScreenHeight + DrawHealthY,
- RenderStringTex(''+inttostr(stats.AIKills)+'', Clan^.Color, fnt16));
+ AIKillsTex);
end;
// if highlighted, draw flag and other contents again to keep their colors