Make watching AI v AI on ai survival a bit more entertaining
authornemo
Mon, 04 Jun 2012 08:11:47 -0400
changeset 7176 fb4b0c6dfdbd
parent 7174 80480d21e6ed
child 7178 c61cfc9eb29d
child 7180 53ffc8853008
Make watching AI v AI on ai survival a bit more entertaining
hedgewars/uGearsList.pas
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsList.pas	Sun Jun 03 23:04:21 2012 -0400
+++ b/hedgewars/uGearsList.pas	Mon Jun 04 08:11:47 2012 -0400
@@ -546,7 +546,8 @@
         inc(KilledHHs);
         RecountTeamHealth(team);
         if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Effects[heResurrectable] <> 0)  and
-        (Gear^.Hedgehog^.Effects[heResurrectable] = 0) then
+        //(Gear^.Hedgehog^.Effects[heResurrectable] = 0) then
+        (Gear^.Hedgehog^.Team^.Clan <> CurrentHedgehog^.Team^.Clan) then
             with CurrentHedgehog^ do 
                 begin
                 inc(Team^.stats.AIKills);
--- a/hedgewars/uGearsUtils.pas	Sun Jun 03 23:04:21 2012 -0400
+++ b/hedgewars/uGearsUtils.pas	Mon Jun 04 08:11:47 2012 -0400
@@ -452,7 +452,8 @@
     gear^.Damage := 0;
     gear^.Health := gear^.Hedgehog^.InitialHealth;
     gear^.Hedgehog^.Effects[hePoisoned] := 0;
-    if CurrentHedgehog^.Effects[heResurrectable] = 0 then
+    if (CurrentHedgehog^.Effects[heResurrectable] = 0) or ((CurrentHedgehog^.Effects[heResurrectable] <> 0)
+          and (Gear^.Hedgehog^.Team^.Clan <> CurrentHedgehog^.Team^.Clan)) then
         with CurrentHedgehog^ do 
             begin
             inc(Team^.stats.AIKills);