This commit is contained in:
Fesiug 2023-12-09 22:27:28 -05:00
parent 9732f9100f
commit 7654f49d58
2 changed files with 6 additions and 1 deletions

View File

@ -224,6 +224,11 @@ function SWEP:Think()
local p = self:GetOwner() local p = self:GetOwner()
local inv = p:INV_Get() local inv = p:INV_Get()
if self:D_GetReqID( false ) != "" and self:D_GetReqID( true ) != "" and self:D_GetReqID( false ) == self:D_GetReqID( true ) then
self:D_SetReqID( false, "" )
self:D_SetReqID( true, "" )
if CLIENT then chat.AddText( "Same weapons on ReqID, both holstered" ) end
end
for i=1, 2 do for i=1, 2 do
local hand = i==2 local hand = i==2
if self:D_GetReqID( hand ) != "" and !inv[self:D_GetReqID( hand )] then if self:D_GetReqID( hand ) != "" and !inv[self:D_GetReqID( hand )] then

View File

@ -29,7 +29,7 @@ local function beatup( ply, num )
invid = invid + 1 invid = invid + 1
if num == 0 then num = 10 end if num == 0 then num = 10 end
if num == invid then if num == invid then
if id == wep:D_GetID( hand ) or id == wep:D_GetReqID( hand ) then if id == wep:D_GetReqID( hand ) then
-- If we are selected our currently equipped weapon, holster it. -- If we are selected our currently equipped weapon, holster it.
return wep:D_SetReqID( hand, "" ) return wep:D_SetReqID( hand, "" )
else else