hedgewars/uStats.pas
changeset 858 5005a485f103
parent 831 5cfd1096be5f
child 864 024369e09a53
--- a/hedgewars/uStats.pas	Tue Apr 22 12:41:14 2008 +0000
+++ b/hedgewars/uStats.pas	Tue Apr 22 13:06:49 2008 +0000
@@ -36,7 +36,7 @@
 procedure SendStats;
 
 implementation
-uses uTeams, uSound;
+uses uTeams, uSound, uMisc;
 var DamageGiven : Longword = 0;
     DamageClan  : Longword = 0;
     DamageTotal : Longword = 0;
@@ -96,23 +96,23 @@
 end;
 
 procedure SendStats;
-//var i, t: LongInt;
-//    msd: Longword; msdhh: PHedgehog;
+var i, t: LongInt;
+    msd: Longword; msdhh: PHedgehog;
 begin
-(*msd:= 0; msdhh:= nil;
+msd:= 0; msdhh:= nil;
 for t:= 0 to Pred(TeamsCount) do
    with TeamsArray[t]^ do
       begin
       for i:= 0 to cMaxHHIndex do
-          if Hedgehogs[i].MaxStepDamage > msd then
+          if Hedgehogs[i].stats.StepDamageGiven > msd then
              begin
              msdhh:= @Hedgehogs[i];
-             msd:= Hedgehogs[i].MaxStepDamage
+             msd:= Hedgehogs[i].stats.StepDamageGiven
              end;
       end;
-if msdhh <> nil then SendStat(siMaxStepDamage, inttostr(msdhh^.MaxStepDamage) + ' ' +
+if msdhh <> nil then SendStat(siMaxStepDamage, inttostr(msd) + ' ' +
                                                msdhh^.Name + ' (' + msdhh^.Team^.TeamName + ')');
-if KilledHHs > 0 then SendStat(siKilledHHs, inttostr(KilledHHs));*)
+if KilledHHs > 0 then SendStat(siKilledHHs, inttostr(KilledHHs));
 end;
 
 end.
\ No newline at end of file