# HG changeset patch # User unc0rr # Date 1208869609 0 # Node ID 5005a485f103d286c1f8954d662fd68c37e3e586 # Parent 43912f139db1c37732d216240c94724df83367c9 Repair round statistics diff -r 43912f139db1 -r 5005a485f103 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