
TOOL.ClientConVar["length"] = 15

function TOOL:LeftClick( trace )

	if (!trace.Entity) then return false end
	if (!trace.Entity:IsValid() ) then return false end
	if (trace.Entity:IsPlayer()) then return false end
	if (trace.Entity:IsWorld()) then return false end
	
	if ( CLIENT ) then return true end
	
	local _length	= math.Max( tonumber( self:GetClientInfo( "length" ) ), 1.001 )
	
	trace.Entity:Extinguish()
	trace.Entity:Ignite( _length, 0 )
	
	return true
	
end

function TOOL:RightClick( trace )

	if (!trace.Entity) then return false end
	if (!trace.Entity:IsValid() ) then return false end
	if (trace.Entity:IsPlayer()) then return false end
	if (trace.Entity:IsWorld()) then return false end
	
	// Client can bail out now
	if ( CLIENT ) then return true end

	trace.Entity:Extinguish()
	
	return true
	
end
