hedgewars/uStats.pas
changeset 870 dd418d9c18c5
parent 869 daddcd31ef34
child 871 f1bf00b7fd5a
--- a/hedgewars/uStats.pas	Thu Apr 24 20:53:35 2008 +0000
+++ b/hedgewars/uStats.pas	Fri Apr 25 13:12:52 2008 +0000
@@ -47,6 +47,7 @@
     KillsTotal  : LongWord = 0;
     AmmoUsedCount : Longword = 0;
     AmmoDamagingUsed : boolean = false;
+    FinishedTurnsTotal: LongInt = -1;
 
 procedure HedgehogDamaged(Gear: PGear);
 begin
@@ -72,6 +73,9 @@
 var Gear: PGear;
     i, t: LongInt;
 begin
+inc(FinishedTurnsTotal);
+if FinishedTurnsTotal = 0 then exit;
+
 inc(CurrentHedgehog^.stats.FinishedTurns);
 
 if (DamageGiven = DamageTotal) and (DamageTotal > 0) then
@@ -96,7 +100,12 @@
 		PlaySound(sndRegret, false)
 
 else if AmmoDamagingUsed then
-	PlaySound(sndMissed, false);
+	PlaySound(sndMissed, false)
+else if AmmoUsedCount > 0 then
+	// nothing ?
+else
+	PlaySound(sndCoward, false);
+
 
 for t:= 0 to Pred(TeamsCount) do
 	with TeamsArray[t]^ do