Skip to content

Commit

Permalink
fix(client): update currentWeapon.slot regardless of swap response
Browse files Browse the repository at this point in the history
Response is only used for some extra sync data (i.e. containers) nowadays.
  • Loading branch information
thelindat committed Jun 20, 2023
1 parent 0b26667 commit 3a670f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1760,11 +1760,11 @@ RegisterNUICallback('swapItems', function(data, cb)
cb(success or false)

if success then
if response then
if weaponSlot and currentWeapon then
currentWeapon.slot = weaponSlot
end
if weaponSlot and currentWeapon then
currentWeapon.slot = weaponSlot
end

if response then
updateInventory(response.items, response.weight)
end
elseif response then
Expand Down

0 comments on commit 3a670f6

Please sign in to comment.