Skip to content

Commit

Permalink
Draw rotor trace line when developer cvar is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
StyledStrike committed Jan 3, 2025
1 parent a52ef8d commit 2e73ab8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/entities/glide_rotor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )

Expand Down

0 comments on commit 2e73ab8

Please sign in to comment.