Skip to content

Commit

Permalink
xrGame/Inventory.cpp: read SOC slots count correctly (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jan 25, 2023
1 parent e82b258 commit 920bfaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xrGame/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ CInventory::CInventory()
m_fMaxWeight = pSettings->r_float("inventory", "max_weight");
m_iMaxBelt = pSettings->read_if_exists<s32>("inventory", "max_belt", 5);

const u16 slotsCount = pSettings->read_if_exists<u16>("inventory", "slots_count", SLOTS_COUNT);
u16 slotsCount = SLOTS_COUNT;
pSettings->read_if_exists<u16>(slotsCount, "inventory", "slots_count", "slots"); // slots_count in CS/COP, slots in SOC

// slots_count + 1 because [0] is the inactive slot
m_slots.reserve(slotsCount + 1u);

Expand Down

0 comments on commit 920bfaa

Please sign in to comment.