Bug fix for developer tools

master
AlmTech Software 5 years ago
parent e9c936eec4
commit 791463cd61
  1. 5
      entities/weapons/quantum_hands/shared.lua

@ -32,6 +32,7 @@ if CLIENT then
hook.Add( "PostDrawOpaqueRenderables", "Quantum_Client_DeveloperHands_HitPos", function() hook.Add( "PostDrawOpaqueRenderables", "Quantum_Client_DeveloperHands_HitPos", function()
if( LocalPlayer():IsSuperAdmin() ) then if( LocalPlayer():IsSuperAdmin() ) then
if( LocalPlayer():GetActiveWeapon():GetClass() == "quantum_hands" ) then
local trace = LocalPlayer():GetEyeTrace() local trace = LocalPlayer():GetEyeTrace()
local angle = trace.HitNormal:Angle() local angle = trace.HitNormal:Angle()
@ -41,7 +42,7 @@ if CLIENT then
render.DrawLine( trace.HitPos, trace.HitPos + 12 * angle:Forward(), Color( 255, 0, 0 ), true ) 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 ) render.DrawLine( trace.HitPos, trace.HitPos + 12 * -angle:Right(), Color( 0, 255, 0 ), true )
render.DrawLine( trace.HitPos, trace.HitPos + 12 * angle:Up(), Color( 0, 0, 255 ), true ) render.DrawLine( trace.HitPos, trace.HitPos + 12 * angle:Up(), Color( 0, 0, 255 ), true )
end
end end
end) end)
end end
@ -92,6 +93,7 @@ function SWEP:PrimaryAttack()
end end
else else
if( LocalPlayer():IsSuperAdmin() ) then if( LocalPlayer():IsSuperAdmin() ) then
LocalPlayer():ChatPrint( "Check console for output.\n" )
Quantum.Debug( "--Hitpos Data--" ) Quantum.Debug( "--Hitpos Data--" )
print( translateVector( "Vector", LocalPlayer():GetEyeTrace().HitPos ) ) print( translateVector( "Vector", LocalPlayer():GetEyeTrace().HitPos ) )
print( translateVector( "Angle", LocalPlayer():GetAngles() ) ) print( translateVector( "Angle", LocalPlayer():GetAngles() ) )
@ -103,6 +105,7 @@ end
function SWEP:SecondaryAttack() function SWEP:SecondaryAttack()
if CLIENT then if CLIENT then
if( LocalPlayer():IsSuperAdmin() ) then if( LocalPlayer():IsSuperAdmin() ) then
LocalPlayer():ChatPrint( "Check console for output.\n" )
Quantum.Debug( "--Camera Data--" ) Quantum.Debug( "--Camera Data--" )
print( translateVector( "Vector", LocalPlayer():GetPos() ) ) print( translateVector( "Vector", LocalPlayer():GetPos() ) )
print( translateVector( "Angle", LocalPlayer():GetAngles() ) ) print( translateVector( "Angle", LocalPlayer():GetAngles() ) )

Loading…
Cancel
Save