Some handling of interaction between king mode and place hogs mode.
authornemo
Mon, 08 Feb 2010 15:56:43 +0000
changeset 2769 82bfcc006afb
parent 2768 b7e0b0751179
child 2770 851313907bcb
Some handling of interaction between king mode and place hogs mode.
hedgewars/HHHandlers.inc
hedgewars/uAmmos.pas
--- a/hedgewars/HHHandlers.inc	Mon Feb 08 12:54:44 2010 +0000
+++ b/hedgewars/HHHandlers.inc	Mon Feb 08 15:56:43 2010 +0000
@@ -269,6 +269,7 @@
 const frametime = 200;
       timertime = frametime * 6;
 begin
+if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit;
 if Gear^.Timer > 1 then
 	begin
 	AllInactive:= false;
--- a/hedgewars/uAmmos.pas	Mon Feb 08 12:54:44 2010 +0000
+++ b/hedgewars/uAmmos.pas	Mon Feb 08 15:56:43 2010 +0000
@@ -126,7 +126,7 @@
         ammos[a]:= cnt;
         if shoppa then Ammoz[a].NumberInCase:= 1;  // FIXME - TEMPORARY remove when crate number in case editor is added
 
-        if ((GameFlags and gfKing) <> 0) and (Ammoz[a].SkipTurns = 0) and (a <> amTeleport) and (a <> amSkip) then 
+        if ((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (Ammoz[a].SkipTurns = 0) and (a <> amTeleport) and (a <> amSkip) then 
             Ammoz[a].SkipTurns:= 1;
 
         if ((GameFlags and gfPlaceHog) <> 0) and