mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
addGrid extra slots creation fix
This commit is contained in:
parent
aa93c27159
commit
6430121cf2
1 changed files with 2 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ void InventoryBuilder::addGrid(
|
|||
|
||||
for (int row = 0; row < rows; row++) {
|
||||
for (int col = 0; col < cols; col++) {
|
||||
if (row * cols + col >= count)
|
||||
return;
|
||||
glm::vec2 position (
|
||||
col * (slotSize + interval) + padding,
|
||||
row * (slotSize + interval) + padding
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue