Holstering akimbos!

This commit is contained in:
Fesiug 2023-12-08 18:46:53 -05:00
parent 65b2c701b7
commit d862cc46ee
2 changed files with 13 additions and 6 deletions

View File

@ -209,6 +209,12 @@ function SWEP:BThinkHolster( hand )
if self:D_GetHolstering( hand ) == 0 then
self:D_SetHolstering( hand, -1 )
self:BHolster( hand )
local p = self:GetOwner()
local req = self:D_GetReqID( hand )
local inv = p:INV_Get()
if req != "" and inv[req] then
self:BDeploy( hand, req )
end
end
end
@ -216,10 +222,7 @@ function SWEP:Think()
local p = self:GetOwner()
local inv = p:INV_Get()
local L, R = true, false
local curr_l, curr_r = self:D_GetID( true ), self:D_GetID( false )
for i=1, 1 do
for i=1, 2 do
local hand = i==2
local req = self:D_GetReqID( hand )
local curr = self:D_GetID( hand )
@ -236,7 +239,7 @@ function SWEP:Think()
end
end
self:BThinkHolster( R )
self:BThinkHolster( hand )
-- print( self:D_GetReqID( hand ), self:D_GetID( hand ) )
end

View File

@ -34,7 +34,11 @@ local function beatup( ply, num )
end
end
end
return ply:SetReqID1( "" )
if ply:KeyDown(IN_ZOOM) then
return ply:SetReqID2( "" )
else
return ply:SetReqID1( "" )
end
end
hook.Add( "PlayerButtonDown", "Benny_PlayerButtonDown_Inv", function( ply, button )