Permalink
Browse files

Fix weapon error with NPCs

  • Loading branch information...
1 parent a27fd92 commit a1466d56d6642286b366a54eb1b7ca3ef7bb5d77 @robotboy655 robotboy655 committed Apr 11, 2014
@@ -271,7 +271,7 @@ end
--
function SWEP:Equip()
- if ( self:GetZoom() == 70 ) then
+ if ( self:GetZoom() == 70 && self.Owner:IsPlayer() ) then
self:SetZoom( self.Owner:GetInfoNum( "fov_desired", 75 ) )
end
@@ -160,7 +160,7 @@ end
function SWEP:OnRemove()
- if ( IsValid( self.Owner ) ) then
+ if ( IsValid( self.Owner ) && CLIENT && self.Owner:IsPlayer() ) then
local vm = self.Owner:GetViewModel()
if ( IsValid( vm ) ) then vm:SetMaterial( "" ) end
end

0 comments on commit a1466d5

Please sign in to comment.