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 if self:D_GetHolstering( hand ) == 0 then
self:D_SetHolstering( hand, -1 ) self:D_SetHolstering( hand, -1 )
self:BHolster( hand ) 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
end end
@ -216,10 +222,7 @@ function SWEP:Think()
local p = self:GetOwner() local p = self:GetOwner()
local inv = p:INV_Get() local inv = p:INV_Get()
local L, R = true, false for i=1, 2 do
local curr_l, curr_r = self:D_GetID( true ), self:D_GetID( false )
for i=1, 1 do
local hand = i==2 local hand = i==2
local req = self:D_GetReqID( hand ) local req = self:D_GetReqID( hand )
local curr = self:D_GetID( hand ) local curr = self:D_GetID( hand )
@ -236,7 +239,7 @@ function SWEP:Think()
end end
end end
self:BThinkHolster( R ) self:BThinkHolster( hand )
-- print( self:D_GetReqID( hand ), self:D_GetID( hand ) ) -- print( self:D_GetReqID( hand ), self:D_GetID( hand ) )
end end

View File

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