Weapon check here, mask check there
This commit is contained in:
parent
c1685fd11d
commit
d638398783
|
@ -84,8 +84,10 @@ hook.Add( "CreateMove", "Benny_CreateMove", function( cmd )
|
||||||
local p = LocalPlayer()
|
local p = LocalPlayer()
|
||||||
local w = p:BennyCheck()
|
local w = p:BennyCheck()
|
||||||
local cdis = false
|
local cdis = false
|
||||||
|
if w then
|
||||||
if w:BClass( false ) and w:BClass( false ).Custom_DisableSpecialMovement and w:BClass( false ).Custom_DisableSpecialMovement( w ) then cdis = true end
|
if w:BClass( false ) and w:BClass( false ).Custom_DisableSpecialMovement and w:BClass( false ).Custom_DisableSpecialMovement( w ) then cdis = true end
|
||||||
if w:BClass( true ) and w:BClass( true ).Custom_DisableSpecialMovement and w:BClass( true ).Custom_DisableSpecialMovement( w ) then cdis = true end
|
if w:BClass( true ) and w:BClass( true ).Custom_DisableSpecialMovement and w:BClass( true ).Custom_DisableSpecialMovement( w ) then cdis = true end
|
||||||
|
end
|
||||||
if GetConVar("benny_cam_override"):GetString() != "" then cdis = true end
|
if GetConVar("benny_cam_override"):GetString() != "" then cdis = true end
|
||||||
if LocalPlayer():NoclippingAndNotVaulting() then cdis = true end
|
if LocalPlayer():NoclippingAndNotVaulting() then cdis = true end
|
||||||
if w and !cdis then -- FPS cam
|
if w and !cdis then -- FPS cam
|
||||||
|
@ -120,7 +122,7 @@ hook.Add( "CreateMove", "Benny_CreateMove", function( cmd )
|
||||||
start = opos,
|
start = opos,
|
||||||
endpos = opos+(ang:Forward()*(2^16)),
|
endpos = opos+(ang:Forward()*(2^16)),
|
||||||
filter = p,
|
filter = p,
|
||||||
mask = MASK_SOLID,
|
mask = MASK_SHOT,
|
||||||
} )
|
} )
|
||||||
|
|
||||||
local planner = (tr.HitPos-p:EyePos()):Angle()
|
local planner = (tr.HitPos-p:EyePos()):Angle()
|
||||||
|
|
Loading…
Reference in New Issue