--- a/hedgewars/uWorld.pas Wed Oct 18 02:17:03 2017 +0200
+++ b/hedgewars/uWorld.pas Wed Oct 18 03:19:43 2017 +0200
@@ -424,7 +424,7 @@
SlotsNum:= 0;
for i:= 0 to cMaxSlotIndex do
- if((i = 0) and (Ammo^[i,1].Count > 0)) or ((i <> 0) and (Ammo^[i,0].Count > 0)) then
+ if((i = 0) and (Ammo^[i,1].Count > 0)) or ((i <> 0) and (i <> cHiddenSlotIndex) and (Ammo^[i,0].Count > 0)) then
inc(SlotsNum);
{$IFDEF USE_LANDSCAPE_AMMOMENU}
SlotsNumX:= SlotsNum;
@@ -455,7 +455,7 @@
x:= AMRect.x;
y:= AMRect.y;
for i:= 0 to cMaxSlotIndex do
- if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then
+ if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (i <> cHiddenSlotIndex) and (Ammo^[i, 0].Count > 0)) then
begin
{$IFDEF USE_LANDSCAPE_AMMOMENU}
y:= AMRect.y;
@@ -662,7 +662,7 @@
{$IFDEF USE_LANDSCAPE_AMMOMENU}
c:= -1;
for i:= 0 to cMaxSlotIndex do
- if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then
+ if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (i <> cHiddenSlotIndex) and (Ammo^[i, 0].Count > 0)) then
begin
inc(c);
{$IFDEF USE_AM_NUMCOLUMN}
@@ -692,7 +692,7 @@
{$ELSE}
c:= -1;
for i:= 0 to cMaxSlotIndex do
- if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then
+ if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (i <> cHiddenSlotIndex) and (Ammo^[i, 0].Count > 0)) then
begin
inc(c);
{$IFDEF USE_AM_NUMCOLUMN}
@@ -720,7 +720,7 @@
end;
end;
{$ENDIF}
- if (Pos >= 0) and (Pos <= cMaxSlotAmmoIndex) and (Slot >= 0) and (Slot <= cMaxSlotIndex)then
+ if (Pos >= 0) and (Pos <= cMaxSlotAmmoIndex) and (Slot >= 0) and (Slot <= cMaxSlotIndex) and (Slot <> cHiddenSlotIndex) then
begin
if (AMShiftX = 0) and (AMShiftY = 0) then
if (Ammo^[Slot, Pos].Count > 0) and (Ammo^[Slot, Pos].AmmoType <> amNothing) then