UTime bug fix involving weapon checks.

This commit is contained in:
Nayruden 2013-01-07 19:45:56 -05:00
parent 3da288402e
commit 3b8d877462

View File

@ -39,11 +39,11 @@ hook.Add( "InitPostEntity", "UtimeInitialize", initialize )
function think()
if not LocalPlayer():IsValid() then return end
if not utime_enable:GetBool() or
(LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():GetClass() == "gmod_camera") then
gpanel:SetVisible( false )
if not utime_enable:GetBool() or not IsValid( LocalPlayer() ) or
(IsValid( LocalPlayer():GetActiveWeapon() ) and LocalPlayer():GetActiveWeapon():GetClass() == "gmod_camera") then
gpanel:SetVisible( false )
else
gpanel:SetVisible( true )
gpanel:SetVisible( true )
end
--gpanel:SetPos( ScrW() - gpanel:GetWide() - 20, 20 )