Make it less annoying
This commit is contained in:
parent
ecef421255
commit
9732f9100f
|
@ -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 ) then
|
if id == wep:D_GetID( hand ) or 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
|
||||||
|
@ -37,7 +37,7 @@ local function beatup( ply, num )
|
||||||
-- If the wanted weapon is in the other hand, request to holster it.
|
-- If the wanted weapon is in the other hand, request to holster it.
|
||||||
wep:D_SetReqID( !hand, "" )
|
wep:D_SetReqID( !hand, "" )
|
||||||
end
|
end
|
||||||
if wep:D_GetID( hand ) != "" then -- If we have something in this hand, swap it with the other
|
if wep:D_GetID( !hand ) != "" and wep:D_GetID( hand ) != "" then -- If we have something in this hand, swap it with the other
|
||||||
wep:D_SetReqID( !hand, wep:D_GetID( hand ) )
|
wep:D_SetReqID( !hand, wep:D_GetID( hand ) )
|
||||||
end
|
end
|
||||||
return wep:D_SetReqID( hand, id )
|
return wep:D_SetReqID( hand, id )
|
||||||
|
|
Loading…
Reference in New Issue