Bob on Start3D

This commit is contained in:
Fesiug 2023-12-15 00:22:11 -05:00
parent e040442511
commit 333efe61a7
2 changed files with 9 additions and 2 deletions

View File

@ -135,7 +135,12 @@ function SWEP:PreDrawViewModel()
self.ViewModelFOV = vmfov self.ViewModelFOV = vmfov
if !arc9_dev_benchgun:GetBool() then if !arc9_dev_benchgun:GetBool() then
cam.Start3D(nil, nil, self:WidescreenFix(vmfov), nil, nil, nil, nil, 0.5, 10000) local mp, ma = self:GetViewModelPosition( EyePos(), EyeAngles(), true )
mp:Sub( EyePos() )
ma:Sub( EyeAngles() )
mp:Mul( -1 )
ma:Mul( -1 )
cam.Start3D(mp, ma, self:WidescreenFix(vmfov), nil, nil, nil, nil, 0.5, 10000)
end end
-- self:DrawCustomModel(true, EyePos() + EyeAngles():Forward() * 16, EyeAngles()) -- self:DrawCustomModel(true, EyePos() + EyeAngles():Forward() * 16, EyeAngles())

View File

@ -105,7 +105,9 @@ local DampAngleEdit = function(a, v1, v2)
LerpAngleEdit(a, v1, v2) LerpAngleEdit(a, v1, v2)
end end
function SWEP:GetViewModelPosition(pos, ang) function SWEP:GetViewModelPosition(pos, ang, meth)
if !meth then return vector_origin, angle_zero end
local owner = self:GetOwner() local owner = self:GetOwner()
if !IsValid(owner) then return end if !IsValid(owner) then return end
-- if owner != LocalPlayer() then return end -- if owner != LocalPlayer() then return end