Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ttt_quickslot #1025

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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