hedgewars/uStats.pas
changeset 4365 4f2b1a152979
parent 4361 64ea345ab655
child 4370 d1d5c1a57a50
--- a/hedgewars/uStats.pas	Wed Nov 17 20:36:35 2010 +0300
+++ b/hedgewars/uStats.pas	Wed Nov 17 20:58:23 2010 +0300
@@ -52,10 +52,10 @@
 
 procedure HedgehogDamaged(Gear: PGear);
 begin
-if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then
+if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then
     vpHurtSameClan:= CurrentHedgehog^.Team^.voicepack
 else
-    vpHurtEnemy:= PHedgehog(Gear^.Hedgehog)^.Team^.voicepack;
+    vpHurtEnemy:= Gear^.Hedgehog^.Team^.voicepack;
 
 if bBetweenTurns then exit;
 
@@ -64,7 +64,7 @@
 if Gear <> CurrentHedgehog^.Gear then
     inc(CurrentHedgehog^.stats.StepDamageGiven, Gear^.Damage);
 
-if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then inc(DamageClan, Gear^.Damage);
+if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(DamageClan, Gear^.Damage);
 
 if Gear^.Health <= Gear^.Damage then
     begin
@@ -73,14 +73,14 @@
     inc(KillsTotal);
     inc(CurrentHedgehog^.Team^.stats.Kills);
     if (CurrentHedgehog^.Team^.TeamName =
-            PHedgehog(Gear^.Hedgehog)^.Team^.TeamName) then begin
+            Gear^.Hedgehog^.Team^.TeamName) then begin
         inc(CurrentHedgehog^.Team^.stats.TeamKills);
         inc(CurrentHedgehog^.Team^.stats.TeamDamage, Gear^.Damage);
     end;
-    if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then inc(KillsClan);
+    if CurrentHedgehog^.Team^.Clan = Gear^.Hedgehog^.Team^.Clan then inc(KillsClan);
     end;
 
-inc(PHedgehog(Gear^.Hedgehog)^.stats.StepDamageRecv, Gear^.Damage);
+inc(Gear^.Hedgehog^.stats.StepDamageRecv, Gear^.Damage);
 inc(DamageGiven, Gear^.Damage);
 inc(DamageTotal, Gear^.Damage)
 end;