hedgewars/uCommandHandlers.pas
branchqmlfrontend
changeset 10748 dc587913987c
parent 10672 c2004c3e9c7d
child 10818 f642a28cab0c
--- a/hedgewars/uCommandHandlers.pas	Thu Dec 18 00:03:53 2014 +0300
+++ b/hedgewars/uCommandHandlers.pas	Sat Jan 03 23:46:26 2015 +0300
@@ -323,6 +323,7 @@
 end;
 
 procedure chAttack_p(var s: shortstring);
+var inbtwnTrgtAttks: Boolean;
 begin
 s:= s; // avoid compiler hint
 if CheckNoTeamOrHH then
@@ -333,7 +334,9 @@
     AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));
     if ((State and gstHHDriven) <> 0) then
         begin
-        FollowGear:= CurrentHedgehog^.Gear;
+        inbtwnTrgtAttks:= ((GameFlags and gfInfAttack) <> 0) and ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0);
+        if (not inbtwnTrgtAttks) then
+            FollowGear:= CurrentHedgehog^.Gear;
         if not isExternalSource then
             SendIPC(_S'A');
         Message:= Message or (gmAttack and InputMask);
@@ -487,7 +490,8 @@
 procedure chCapture(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-flagMakeCapture:= true
+flagMakeCapture:= true;
+flagDumpLand:= LocalMessage and gmPrecise  <> 0;
 end;
 
 procedure chRecord(var s: shortstring);