hedgewars/GSHandlers.inc
changeset 1865 ebc6dfca60d4
parent 1861 98de5dc5fda7
child 1867 2fc0e1e39b11
--- a/hedgewars/GSHandlers.inc	Fri Mar 06 13:50:40 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sat Mar 07 17:42:54 2009 +0000
@@ -48,6 +48,8 @@
 	else
 		PlaySound(sndOw1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
 
+//    if (CurrentHedgehog^.Gear = Gear) and (not Gear^.Invulnerable) then
+//	    Gear^.State:= Gear^.State or gstLoser;
 	dmg:= modifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70));
 	inc(Gear^.Damage, dmg);
 	AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y) + cHHRadius, dmg, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color);
@@ -1705,8 +1707,11 @@
 	while gi <> nil do
 		begin
 		dmg:= cakeDmg * 2 - hwRound(Distance(gi^.X - Gear^.X, gi^.Y - Gear^.Y));
-		if (dmg > 1) and (gi^.Kind = gtHedgehog) and (not gi^.Invulnerable) then
-			gi^.State:= gi^.State or gstWinner;
+		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
+            if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
+//			    gi^.State:= gi^.State or gstLoser
+            else
+			    gi^.State:= gi^.State or gstWinner;
 		gi:= gi^.NextGear
 		end;
 	Gear^.doStep:= @doStepCakeExpl;