From db57afc1fa6b3c7e882f7ca3ac4f3c329c4143c2 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Wed, 29 Nov 2023 00:39:42 -0500 Subject: [PATCH] Fix handedness influencing the equip command --- gamemodes/benny/gamemode/modules/player/sh_basic.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gamemodes/benny/gamemode/modules/player/sh_basic.lua b/gamemodes/benny/gamemode/modules/player/sh_basic.lua index 226b6fb..659c8ac 100644 --- a/gamemodes/benny/gamemode/modules/player/sh_basic.lua +++ b/gamemodes/benny/gamemode/modules/player/sh_basic.lua @@ -48,7 +48,7 @@ end, "arg 1: player ent index, arg 2: classname") concommand.Add("benny_inv_equip", function( ply, cmd, args ) local wep = ply:BennyCheck() if wep then - local hand = args[2]!=nil and tobool(args[2]) or wep:GetTempHandedness() + local hand = args[2]!=nil and tobool(args[2]) local id = args[1] local swap_or_replace = tobool(args[3]) @@ -379,11 +379,7 @@ if CLIENT then -- timer.Simple( 0.1, function() if IsValid( itemlist ) then regen_items( itemlist ) end end ) end - function button:DoRightClick() - RunConsoleCommand("benny_inv_discard", button.ID) - self:Remove() - -- timer.Simple( 0.1, function() if IsValid( itemlist ) then regen_items( itemlist ) end end ) - end + button.DoRightClick = button.DoClick function button:Paint( w, h ) surface.SetDrawColor( schemes[active]["fg"] )