Skip to content

Commit

Permalink
fix ttt_quickslot (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruby0b authored Mar 7, 2023
1 parent a097cfb commit 629535a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
- Fixed hotreload of TTT2 roles library by a fresh reinitialization
- Fixed a wrong localization line call in roles.lua (by @Satton2)
- Fixed +zoom bind
- Fixed ttt_quickslot command

## [v0.11.6b](https://github.com/TTT-2/TTT2/tree/v0.11.6b) (2022-09-25)

Expand Down
4 changes: 2 additions & 2 deletions gamemodes/terrortown/gamemode/client/cl_wepswitch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ end
local function QuickSlot(ply, cmd, args)
if not IsValid(ply) or not args or #args ~= 1 then return end

local slot = tonumber(args)
local slot = tonumber(args[1])
if not slot then return end

local wep = ply:GetActiveWeapon()
if not IsValid(wep) then return end

if MakeKindValid(wep.Kind) == slot - 1 then
if MakeKindValid(wep.Kind) == slot then
RunConsoleCommand("lastinv")
else
WSWITCH:SelectAndConfirm(slot)
Expand Down

0 comments on commit 629535a

Please sign in to comment.