hotbar: wrap
This commit is contained in:
@@ -117,10 +117,12 @@ function ClientState:SetSelectedSlot(slot: number)
|
||||
return
|
||||
end
|
||||
local hotbar = replicaForPlayer.Data.hotbar
|
||||
if not hotbar or not hotbar[slot] then
|
||||
if not hotbar then
|
||||
return
|
||||
end
|
||||
replicaForPlayer:FireServer("SelectHotbarSlot", slot)
|
||||
if slot and slot >= 1 and slot <= HOTBAR_SIZE then
|
||||
replicaForPlayer:FireServer("SelectHotbarSlot", slot)
|
||||
end
|
||||
end
|
||||
|
||||
ClientState.Changed = changed.Event
|
||||
|
||||
Reference in New Issue
Block a user