hedgewars/uStats.pas
changeset 9180 d19c09670ec8
parent 9174 d328fe17b195
child 9197 e4e366013e9a
child 9397 7b7ee65f82ad
equal deleted inserted replaced
9179:7ce9f68d28dc 9180:d19c09670ec8
    22 interface
    22 interface
    23 uses uConsts, uTypes;
    23 uses uConsts, uTypes;
    24 
    24 
    25 var TotalRounds: LongInt;
    25 var TotalRounds: LongInt;
    26     FinishedTurnsTotal: LongInt;
    26     FinishedTurnsTotal: LongInt;
    27     SendStatsOn : boolean = true;
    27     SendHealthStatsOn : boolean = true;
    28     
    28     
    29 procedure initModule;
    29 procedure initModule;
    30 procedure freeModule;
    30 procedure freeModule;
    31 
    31 
    32 procedure AmmoUsed(am: TAmmoType);
    32 procedure AmmoUsed(am: TAmmoType);
   162                 StepKills:= 0;
   162                 StepKills:= 0;
   163                 StepDamageRecv:= 0;
   163                 StepDamageRecv:= 0;
   164                 StepDamageGiven:= 0
   164                 StepDamageGiven:= 0
   165                 end;
   165                 end;
   166                 
   166                 
   167 if SendStatsOn then
   167 if SendHealthStatsOn then
   168 	for t:= 0 to Pred(ClansCount) do
   168 	for t:= 0 to Pred(ClansCount) do
   169 		with ClansArray[t]^ do
   169 		with ClansArray[t]^ do
   170 			begin
   170 			begin
   171 			SendStat(siClanHealth, IntToStr(Color) + ' ' + IntToStr(ClanHealth));
   171 			SendStat(siClanHealth, IntToStr(Color) + ' ' + IntToStr(ClanHealth));
   172 			end;
   172 			end;
   207     maxTurnSkipsName : shortstring;
   207     maxTurnSkipsName : shortstring;
   208     maxTeamDamage : Longword;
   208     maxTeamDamage : Longword;
   209     maxTeamDamageName : shortstring;
   209     maxTeamDamageName : shortstring;
   210     winnersClan : PClan;
   210     winnersClan : PClan;
   211 begin
   211 begin
   212 if SendStatsOn then
   212 if SendHealthStatsOn then
   213 	msd:= 0; msdhh:= nil;
   213 	msd:= 0; msdhh:= nil;
   214 	msk:= 0; mskhh:= nil;
   214 	msk:= 0; mskhh:= nil;
   215 	mskcnt:= 0;
   215 	mskcnt:= 0;
   216 	maxTeamKills := 0;
   216 	maxTeamKills := 0;
   217 	maxTurnSkips := 0;
   217 	maxTurnSkips := 0;