|
|
|
@ -14,7 +14,7 @@ if CLIENT then |
|
|
|
|
SWEP.DrawCrosshair = false |
|
|
|
|
|
|
|
|
|
function SWEP:DrawHUD() |
|
|
|
|
if( self:GetOwner():IsSuperAdmin() ) then |
|
|
|
|
if( self:GetOwner():IsSuperAdmin() && !Quantum.Client.IsInMenu ) then |
|
|
|
|
surface.SetTextPos( 10, 10 ) |
|
|
|
|
surface.SetTextColor( Color( 200, 200, 200, 200 ) ) |
|
|
|
|
surface.SetFont( "Default" ) |
|
|
|
@ -31,13 +31,13 @@ if CLIENT then |
|
|
|
|
local cubeMat = Material( "vgui/white" ) |
|
|
|
|
|
|
|
|
|
hook.Add( "PostDrawOpaqueRenderables", "Quantum_Client_DeveloperHands_HitPos", function() |
|
|
|
|
if( LocalPlayer():IsSuperAdmin() ) then |
|
|
|
|
if( LocalPlayer():IsSuperAdmin() && !Quantum.Client.IsInMenu ) then |
|
|
|
|
if( LocalPlayer():GetActiveWeapon():GetClass() == "quantum_hands" ) then |
|
|
|
|
local trace = LocalPlayer():GetEyeTrace() |
|
|
|
|
local angle = trace.HitNormal:Angle() |
|
|
|
|
|
|
|
|
|
render.SetMaterial( cubeMat ) |
|
|
|
|
render.DrawBox( trace.HitPos, Angle( 0, 0, 0), Vector( 0, 0, 0 ), Vector( 2, 2, 2 ), Color( 255, 255, 255 ) ) |
|
|
|
|
render.DrawBox( trace.HitPos, Angle( 0, 0, 0), Vector( 0, 0, 0 ), Vector( 2, 2, 2 ), Color( 255, 25, 25, 100 ) ) |
|
|
|
|
|
|
|
|
|
render.DrawLine( trace.HitPos, trace.HitPos + 12 * angle:Forward(), Color( 255, 0, 0 ), true ) |
|
|
|
|
render.DrawLine( trace.HitPos, trace.HitPos + 12 * -angle:Right(), Color( 0, 255, 0 ), true ) |
|
|
|
|