pathc by nemo
authorunc0rr
Sat, 07 Mar 2009 20:23:49 +0000
changeset 1868 2fe8d045f6a1
parent 1867 2fc0e1e39b11
child 1869 490005509a7b
pathc by nemo
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Sat Mar 07 17:49:11 2009 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 07 20:23:49 2009 +0000
@@ -434,6 +434,8 @@
 		if (Gear^.Damage <> 0) and
 		(not Gear^.Invulnerable) then
 			begin
+            if (PHedgehog(Gear^.Hedgehog)^.Team = CurrentTeam) then
+                Gear^.State:= Gear^.State or gstLoser;
 			CheckNoDamage:= false;
 			uStats.HedgehogDamaged(Gear);
 			dmg:= Gear^.Damage;
@@ -1337,9 +1339,9 @@
 							DeleteCI(Gear);
 							Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - int2hwFloat(X));
 							Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - int2hwFloat(Y));
-							Gear^.State:= Gear^.State or gstMoving;
+							Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
 							if not Gear^.Invulnerable then
-								Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
+								Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner);
 							Gear^.Active:= true;
 							FollowGear:= Gear
 							end;