Repair round statistics
authorunc0rr
Tue, 22 Apr 2008 13:06:49 +0000
changeset 858 5005a485f103
parent 857 43912f139db1
child 859 8ec363abbdce
Repair round statistics
hedgewars/uStats.pas
--- 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