Move cake FollowGear to Attack like most others, remove the gmAttack clearing which is also done in Attack.
authornemo
Sat, 29 Nov 2014 14:57:07 -0500
changeset 10579 2effda40c3b2
parent 10578 814acf1511be
child 10580 17560eb73b4c
Move cake FollowGear to Attack like most others, remove the gmAttack clearing which is also done in Attack.
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Nov 29 14:00:40 2014 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Nov 29 14:57:07 2014 -0500
@@ -3089,11 +3089,8 @@
     AllInactive := false;
 
     HHGear := Gear^.Hedgehog^.Gear;
-    HHGear^.Message := HHGear^.Message and (not gmAttack);
     Gear^.CollisionMask:= lfNotCurrentMask;
 
-    FollowGear := Gear;
-
     Gear^.dY:= cMaxWindSpeed * 100;
 
     Gear^.doStep := @doStepCakeFall
--- a/hedgewars/uGearsHedgehog.pas	Sat Nov 29 14:00:40 2014 -0500
+++ b/hedgewars/uGearsHedgehog.pas	Sat Nov 29 14:57:07 2014 -0500
@@ -443,6 +443,7 @@
                       amTardis, amPiano,
                       amIceGun, amRubber: CurAmmoGear:= newGear;
             end;
+	    if CurAmmoType = amCake then FollowGear:= newGear;
 
             if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then
                 newGear^.FlightTime:= GameTicks + 1000