Skip to content

Commit

Permalink
fix(server/inventory): round count in 'Inventory.Set' (#1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamzky authored May 4, 2024
1 parent 2e4e38f commit 98e8f51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/inventory/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ function Inventory.Set(inv, k, v)
inv = Inventory(inv) --[[@as OxInventory]]

if inv then
if type(v) == 'number' then math.floor(v + 0.5) end
if type(v) == 'number' then
v = math.floor(v + 0.5)
end

if k == 'open' and v == false then
if inv.type ~= 'player' then
Expand Down

0 comments on commit 98e8f51

Please sign in to comment.