hedgewars/uWorld.pas
changeset 7964 d00378a37dde
parent 7858 2566fc2621d4
child 8026 4a4f21070479
child 8138 cfb228baa598
--- a/hedgewars/uWorld.pas	Sun Nov 04 17:27:54 2012 -0500
+++ b/hedgewars/uWorld.pas	Sun Nov 04 17:47:44 2012 -0500
@@ -511,9 +511,7 @@
     Ammo: PHHAmmo;
     c,i,g,t,STurns: LongInt;
 begin
-if (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil)
-or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) then
-    bShowAmmoMenu:= false;
+if TurnTimeLeft = 0 then bShowAmmoMenu:= false;
 
 // give the assigned ammo to hedgehog
 Ammo:= nil;
@@ -552,16 +550,19 @@
         AmmoRect.x:= (cScreenWidth shr 1) - AmmoRect.w - AMSlotSize;
         AmmoRect.y:= cScreenHeight - (AmmoRect.h + AMSlotSize);
 {$ENDIF}
-    AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x;
-    AMShiftTargetY:= cScreenHeight        - AmmoRect.y;
+    if AMState <> AMShowing then
+        begin
+        AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x;
+        AMShiftTargetY:= cScreenHeight        - AmmoRect.y;
 
-    if (AMAnimType and AMTypeMaskX) <> 0 then AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x
-    else AMShiftTargetX:= 0;
-    if (AMAnimType and AMTypeMaskY) <> 0 then AMShiftTargetY:= cScreenHeight        - AmmoRect.y
-    else AMShiftTargetY:= 0;
+        if (AMAnimType and AMTypeMaskX) <> 0 then AMShiftTargetX:= (cScreenWidth shr 1) - AmmoRect.x
+        else AMShiftTargetX:= 0;
+        if (AMAnimType and AMTypeMaskY) <> 0 then AMShiftTargetY:= cScreenHeight        - AmmoRect.y
+        else AMShiftTargetY:= 0;
 
-    AMShiftX:= AMShiftTargetX;
-    AMShiftY:= AMShiftTargetY;
+        AMShiftX:= AMShiftTargetX;
+        AMShiftY:= AMShiftTargetY
+        end
 end;
 
 AMAnimState:= (RealTicks - AMAnimStartTime) / AMAnimDuration;