MADS: Minor fix to inentory top index setting
This commit is contained in:
parent
dbbfdeec8f
commit
da43f4438d
1 changed files with 2 additions and 2 deletions
|
@ -110,8 +110,8 @@ void InventoryObjects::addToInventory(int objectId) {
|
|||
userInterface._inventoryTopIndex = CLIP(userInterface._inventoryTopIndex,
|
||||
0, (int)_inventoryList.size() - 1);
|
||||
|
||||
if ((userInterface._inventoryTopIndex + 5) < (int)_inventoryList.size())
|
||||
userInterface._inventoryTopIndex = size() - 5;
|
||||
if ((userInterface._inventoryTopIndex + 5) <= (int)_inventoryList.size())
|
||||
userInterface._inventoryTopIndex = size() - 4;
|
||||
userInterface._inventoryChanged = true;
|
||||
|
||||
(*this)[objectId]._roomNumber = PLAYER_INVENTORY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue