hedgewars/uGearsUtils.pas
changeset 7186 013deb83086b
parent 7176 fb4b0c6dfdbd
child 7190 aa8d68817c32
--- a/hedgewars/uGearsUtils.pas	Mon May 28 10:38:27 2012 +0200
+++ b/hedgewars/uGearsUtils.pas	Tue Jun 05 22:17:06 2012 +0200
@@ -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);
@@ -474,6 +475,7 @@
     if gear <> nil then
         begin
         AddVisualGear(hwRound(gear^.X), hwRound(gear^.Y), vgtExplosion);
+        PlaySound(sndWarp);
         RenderHealth(gear^.Hedgehog^);
         ScriptCall('onGearResurrect', gear^.uid);
         gear^.State := gstWait;