Don't allow holster things
This commit is contained in:
parent
f64346f27d
commit
76e8f3b37b
|
@ -193,19 +193,26 @@ function SWEP:Think()
|
||||||
local curr = self:D_GetID( hand )
|
local curr = self:D_GetID( hand )
|
||||||
local curr_o = self:D_GetID( !hand )
|
local curr_o = self:D_GetID( !hand )
|
||||||
if req != curr then
|
if req != curr then
|
||||||
if curr != "" then
|
-- Don't allow holstering from this weapon if...
|
||||||
-- require holster first
|
-- Just know, this feels bad.
|
||||||
self:BStartHolster( hand )
|
if self:D_GetReloading( hand ) > 0 then
|
||||||
|
elseif self:D_GetShotTime( hand ) + self:GetStat( hand, "ShootHolsterTime" ) > CurTime() then
|
||||||
|
|
||||||
else
|
else
|
||||||
local otherhasthis = curr_o == req
|
if curr != "" then
|
||||||
if req != "" then
|
-- require holster first
|
||||||
if otherhasthis then
|
|
||||||
self:BStartHolster( !hand )
|
|
||||||
else
|
|
||||||
self:BDeploy( hand, req )
|
|
||||||
end
|
|
||||||
else
|
|
||||||
self:BStartHolster( hand )
|
self:BStartHolster( hand )
|
||||||
|
else
|
||||||
|
local otherhasthis = curr_o == req
|
||||||
|
if req != "" then
|
||||||
|
if otherhasthis then
|
||||||
|
self:BStartHolster( !hand )
|
||||||
|
else
|
||||||
|
self:BDeploy( hand, req )
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:BStartHolster( hand )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue