From 2e73ab830afe64cbf87d2df632f77b3cc1d76571 Mon Sep 17 00:00:00 2001 From: StyledStrike Date: Fri, 3 Jan 2025 00:49:19 -0300 Subject: [PATCH] Draw rotor trace line when `developer` cvar is 1 --- lua/entities/glide_rotor.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/entities/glide_rotor.lua b/lua/entities/glide_rotor.lua index 39f9368..5be7955 100644 --- a/lua/entities/glide_rotor.lua +++ b/lua/entities/glide_rotor.lua @@ -54,6 +54,8 @@ function ENT:Initialize() maxs = TRACE_MAXS } + self.isDebugging = GetConVar( "developer" ):GetBool() + self:SetModel( self.modelSlow ) self:SetSolid( SOLID_NONE ) self:SetMoveType( MOVETYPE_VPHYSICS ) @@ -173,7 +175,9 @@ function ENT:CheckRotorClearance( dt, parent ) data.start = origin data.endpos = origin + dir * self.radius - --debugoverlay.Line( data.start, data.endpos, 0.05, Color(255,0,0), true ) + if self.isDebugging then + debugoverlay.Line( data.start, data.endpos, 0.05, Color( 255, 0, 0 ), true ) + end local tr = TraceHull( data )