hedgewars/uGears.pas
changeset 2608 cebfea02f8b5
parent 2599 c7153d2348f3
child 2611 07b0cc91256c
--- a/hedgewars/uGears.pas	Mon Nov 09 18:44:09 2009 +0000
+++ b/hedgewars/uGears.pas	Mon Nov 09 20:29:21 2009 +0000
@@ -622,23 +622,26 @@
 			inc(step)
 			end;
 	stNTurn: begin
-			if isInMultiShoot then isInMultiShoot:= false
+			if isInMultiShoot then
+				isInMultiShoot:= false
 			else begin
-			// delayed till after 0.9.12
-			// reset to default zoom
-			//ZoomValue:= ZoomDefault;
-			ResetUtilities;
-
-			FreeActionsList; // could send -left, -right and similar commands, so should be called before /nextturn
+				// delayed till after 0.9.12
+				// reset to default zoom
+				//ZoomValue:= ZoomDefault;
+				with CurrentHedgehog^ do
+					if ((Gear^.State and gstAttacked) = 0)
+						and (MultiShootAttacks > 0) then OnUsedAmmo(CurrentHedgehog^);
+				
+				ResetUtilities;
 
-			ParseCommand('/nextturn', true);
-			SwitchHedgehog;
+				FreeActionsList; // could send -left, -right and similar commands, so should be called before /nextturn
 
-			inc(step); // FIXME wtf is that, it overflows step, and does nothing
+				ParseCommand('/nextturn', true);
+				SwitchHedgehog;
 
-			AfterSwitchHedgehog;
-			bBetweenTurns:= false
-			end;
+				AfterSwitchHedgehog;
+				bBetweenTurns:= false
+				end;
 			step:= Low(step)
 			end;
 	end;