Fix handedness influencing the equip command
This commit is contained in:
parent
abf908c7c0
commit
db57afc1fa
|
@ -48,7 +48,7 @@ end, "arg 1: player ent index, arg 2: classname")
|
||||||
concommand.Add("benny_inv_equip", function( ply, cmd, args )
|
concommand.Add("benny_inv_equip", function( ply, cmd, args )
|
||||||
local wep = ply:BennyCheck()
|
local wep = ply:BennyCheck()
|
||||||
if wep then
|
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 id = args[1]
|
||||||
local swap_or_replace = tobool(args[3])
|
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 )
|
-- timer.Simple( 0.1, function() if IsValid( itemlist ) then regen_items( itemlist ) end end )
|
||||||
end
|
end
|
||||||
|
|
||||||
function button:DoRightClick()
|
button.DoRightClick = button.DoClick
|
||||||
RunConsoleCommand("benny_inv_discard", button.ID)
|
|
||||||
self:Remove()
|
|
||||||
-- timer.Simple( 0.1, function() if IsValid( itemlist ) then regen_items( itemlist ) end end )
|
|
||||||
end
|
|
||||||
|
|
||||||
function button:Paint( w, h )
|
function button:Paint( w, h )
|
||||||
surface.SetDrawColor( schemes[active]["fg"] )
|
surface.SetDrawColor( schemes[active]["fg"] )
|
||||||
|
|
Loading…
Reference in New Issue