--- 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;