Skip to content

Commit

Permalink
Fix weapon error with NPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
robotboy655 committed Apr 11, 2014
1 parent a27fd92 commit a1466d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion garrysmod/lua/weapons/weapon_fists.lua
Expand Up @@ -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
Expand Down

0 comments on commit a1466d5

Please sign in to comment.