@@ -87,18 +87,18 @@ function ADDrawingManager.initObject(id)
8787 return itemId
8888end
8989
90- function ADDrawingManager :addLineTask (sx , sy , sz , ex , ey , ez , r , g , b )
90+ function ADDrawingManager :addLineTask (sx , sy , sz , ex , ey , ez , scale , r , g , b )
9191 -- storing task
9292 local hash = 0
9393 -- local hash = string.format("l%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.1f", sx, sy, sz, ex, ey, ez, r, g, b, self.yOffset)
94- table.insert (self .lines .tasks , {sx = sx , sy = sy , sz = sz , ex = ex , ey = ey , ez = ez , r = r , g = g , b = b , hash = hash })
94+ table.insert (self .lines .tasks , {sx = sx , sy = sy , sz = sz , ex = ex , ey = ey , ez = ez , scale = scale , r = r , g = g , b = b , hash = hash })
9595end
9696
97- function ADDrawingManager :addArrowTask (sx , sy , sz , ex , ey , ez , position , r , g , b )
97+ function ADDrawingManager :addArrowTask (sx , sy , sz , ex , ey , ez , scale , position , r , g , b )
9898 -- storing task
9999 local hash = 0
100100 -- local hash = string.format("a%.2f%.2f%.2f%.2f%.2f%.2f%d%.2f%.2f%.2f%.1f", sx, sy, sz, ex, ey, ez, position, r, g, b, self.yOffset)
101- table.insert (self .arrows .tasks , {sx = sx , sy = sy , sz = sz , ex = ex , ey = ey , ez = ez , r = r , g = g , b = b , position = position , hash = hash })
101+ table.insert (self .arrows .tasks , {sx = sx , sy = sy , sz = sz , ex = ex , ey = ey , ez = ez , scale = scale , r = r , g = g , b = b , position = position , hash = hash })
102102end
103103
104104function ADDrawingManager :addSmallSphereTask (x , y , z , r , g , b )
@@ -115,11 +115,11 @@ function ADDrawingManager:addMarkerTask(x, y, z)
115115 table.insert (self .markers .tasks , {x = x , y = y , z = z , hash = hash })
116116end
117117
118- function ADDrawingManager :addCrossTask (x , y , z )
118+ function ADDrawingManager :addCrossTask (x , y , z , scale )
119119 -- storing task
120120 local hash = 0
121121 -- local hash = string.format("c%.2f%.2f%.2f%.1f", x, y, z, self.yOffset)
122- table.insert (self .cross .tasks , {x = x , y = y , z = z , hash = hash })
122+ table.insert (self .cross .tasks , {x = x , y = y , z = z , scale = scale , hash = hash })
123123end
124124
125125function ADDrawingManager :addSphereTask (x , y , z , scale , r , g , b , a )
@@ -348,7 +348,7 @@ function ADDrawingManager:drawLine(id, task)
348348
349349 setTranslation (id , task .sx , task .sy + self .yOffset , task .sz )
350350
351- local scaleLines = AutoDrive .getSetting (" scaleLines" ) or 1
351+ local scaleLines = ( AutoDrive .getSetting (" scaleLines" ) or 1 ) * ( task . scale or 1 )
352352 setScale (id , scaleLines , scaleLines , distToNextPoint )
353353
354354 -- Set the direction of the line
@@ -387,7 +387,7 @@ function ADDrawingManager:drawArrow(id, task)
387387
388388 setTranslation (id , x , y + self .yOffset , z )
389389
390- local scaleLines = AutoDrive .getSetting (" scaleLines" ) or 1
390+ local scaleLines = ( AutoDrive .getSetting (" scaleLines" ) or 1 ) * ( task . scale or 1 )
391391 setScale (id , scaleLines , scaleLines , scaleLines )
392392
393393 -- Set the direction of the arrow
413413
414414function ADDrawingManager :drawCross (id , task )
415415 setTranslation (id , task .x , task .y + self .yOffset , task .z )
416- local scaleLines = AutoDrive .getSetting (" scaleLines" ) or 1
416+ local scaleLines = ( AutoDrive .getSetting (" scaleLines" ) or 1 ) * ( task . scale or 1 )
417417 setScale (id , scaleLines , scaleLines , scaleLines )
418418 setVisibility (id , true )
419419end
0 commit comments