Ensure ammo menu is flagged false if no ammo
authornemo
Tue, 09 Mar 2010 02:48:27 +0000
changeset 2971 c65929077646
parent 2970 011075f93746
child 2972 82828fd23dea
Ensure ammo menu is flagged false if no ammo
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Tue Mar 09 02:02:22 2010 +0000
+++ b/hedgewars/uWorld.pas	Tue Mar 09 02:48:27 2010 +0000
@@ -201,7 +201,11 @@
    Ammo:= GetAmmoByNum(LocalAmmo);
 Slot:= 0;
 Pos:= -1;
-if Ammo = nil then exit;
+if Ammo = nil then
+    begin
+    bShowAmmoMenu:= false;
+    exit
+    end;
 SlotsNum:= 0;
 x:= (cScreenWidth shr 1) - 210 + AMxShift;
 y:= cScreenHeight - 40;