Don't crash on faulty player (missing GetAimVector, fixes the bug mentioned on the front page).

master
Icedream 2014-03-03 01:22:36 +01:00
parent fba811e125
commit f65cc5fb03
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ end)
hook.Add("HUDPaint", "Disguiser.ThirdPersonHUDPaint", function() hook.Add("HUDPaint", "Disguiser.ThirdPersonHUDPaint", function()
local ply = LocalPlayer() local ply = LocalPlayer()
if IsValid(ply) && ply:Alive() && ply:GetNetworkedBool("thirdperson") then if IsValid(ply) && !!ply["GetAimVector"] && ply:Alive() && ply:GetNetworkedBool("thirdperson") then
// trace from muzzle to hit pos // trace from muzzle to hit pos
local t = {} local t = {}
t.start = ply:GetShootPos() t.start = ply:GetShootPos()