Skip to content

Commit

Permalink
Merge pull request #827 from Acecool/patch-1
Browse files Browse the repository at this point in the history
Updated CalcView to allow CalcVehicleView to be hooked
  • Loading branch information
robotboy655 committed Mar 26, 2015
2 parents 5803c78 + f114286 commit 7fdd1f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions garrysmod/gamemodes/base/gamemode/cl_init.lua
Expand Up @@ -360,9 +360,9 @@ function GM:CalcView( ply, origin, angles, fov, znear, zfar )
view.drawviewer = false
--
-- Let the vehicle override the view
-- Let the vehicle override the view and allows the vehicle view to be hooked
--
if ( IsValid( Vehicle ) ) then return GAMEMODE:CalcVehicleView( Vehicle, ply, view ) end
if ( IsValid( Vehicle ) ) then return hook.Call( "CalcVehicleView", GAMEMODE, Vehicle, ply, view ) end
--
-- Let drive possibly alter the view
Expand Down

0 comments on commit 7fdd1f5

Please sign in to comment.