loser animation by nemo
authorunc0rr
Sat, 07 Mar 2009 17:49:11 +0000
changeset 1867 2fc0e1e39b11
parent 1866 36aa0ca6e8af
child 1868 2fe8d045f6a1
loser animation by nemo
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Sat Mar 07 17:43:25 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sat Mar 07 17:49:11 2009 +0000
@@ -48,8 +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;
+    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);
@@ -1709,7 +1709,7 @@
 		dmg:= cakeDmg * 2 - hwRound(Distance(gi^.X - Gear^.X, gi^.Y - Gear^.Y));
 		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
             if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
-//			    gi^.State:= gi^.State or gstLoser
+			    gi^.State:= gi^.State or gstLoser
             else
 			    gi^.State:= gi^.State or gstWinner;
 		gi:= gi^.NextGear
--- a/hedgewars/uGears.pas	Sat Mar 07 17:43:25 2009 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 07 17:49:11 2009 +0000
@@ -1339,7 +1339,7 @@
 							Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - int2hwFloat(Y));
 							Gear^.State:= Gear^.State or gstMoving;
 							if not Gear^.Invulnerable then
-								Gear^.State:= Gear^.State and (not gstWinner);
+								Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
 							Gear^.Active:= true;
 							FollowGear:= Gear
 							end;