mirror of
https://github.com/dvdvideo1234/TrackAssemblyTool.git
synced 2025-03-04 03:13:32 -05:00
Updated: Active radius limits
Updated: Draw tool screen sequence
This commit is contained in:
parent
9e9e596c91
commit
b485abd3ab
@ -85,7 +85,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
|
|||||||
------------ CONFIGURE ASMLIB ------------
|
------------ CONFIGURE ASMLIB ------------
|
||||||
|
|
||||||
asmlib.InitBase("track","assembly")
|
asmlib.InitBase("track","assembly")
|
||||||
asmlib.SetOpVar("TOOL_VERSION","8.731")
|
asmlib.SetOpVar("TOOL_VERSION","8.732")
|
||||||
asmlib.SetIndexes("V" ,1,2,3)
|
asmlib.SetIndexes("V" ,1,2,3)
|
||||||
asmlib.SetIndexes("A" ,1,2,3)
|
asmlib.SetIndexes("A" ,1,2,3)
|
||||||
asmlib.SetIndexes("WV",1,2,3)
|
asmlib.SetIndexes("WV",1,2,3)
|
||||||
@ -136,7 +136,7 @@ asmlib.SetBorder(gsToolPrefL.."incsnpang", 0, gnMaxRot)
|
|||||||
asmlib.SetBorder(gsToolPrefL.."incsnplin", 0, 250)
|
asmlib.SetBorder(gsToolPrefL.."incsnplin", 0, 250)
|
||||||
asmlib.SetBorder(gsToolPrefL.."logfile" , 0, 1)
|
asmlib.SetBorder(gsToolPrefL.."logfile" , 0, 1)
|
||||||
asmlib.SetBorder(gsToolPrefL.."logsmax" , 0, 100000)
|
asmlib.SetBorder(gsToolPrefL.."logsmax" , 0, 100000)
|
||||||
asmlib.SetBorder(gsToolPrefL.."maxactrad", 1, 200)
|
asmlib.SetBorder(gsToolPrefL.."maxactrad", 1, 400)
|
||||||
asmlib.SetBorder(gsToolPrefL.."maxforce" , 0, 200000)
|
asmlib.SetBorder(gsToolPrefL.."maxforce" , 0, 200000)
|
||||||
asmlib.SetBorder(gsToolPrefL.."maxfruse" , 1, 150)
|
asmlib.SetBorder(gsToolPrefL.."maxfruse" , 1, 150)
|
||||||
asmlib.SetBorder(gsToolPrefL.."maxlinear", 0)
|
asmlib.SetBorder(gsToolPrefL.."maxlinear", 0)
|
||||||
@ -390,7 +390,7 @@ if(SERVER) then
|
|||||||
local nextyaw = mathClamp(pPly:GetInfoNum(gsToolPrefL.."nextyaw" , 0),-gnMaxRot, gnMaxRot)
|
local nextyaw = mathClamp(pPly:GetInfoNum(gsToolPrefL.."nextyaw" , 0),-gnMaxRot, gnMaxRot)
|
||||||
local nextrol = mathClamp(pPly:GetInfoNum(gsToolPrefL.."nextrol" , 0),-gnMaxRot, gnMaxRot)
|
local nextrol = mathClamp(pPly:GetInfoNum(gsToolPrefL.."nextrol" , 0),-gnMaxRot, gnMaxRot)
|
||||||
local forcelim = mathClamp(pPly:GetInfoNum(gsToolPrefL.."forcelim", 0),0,asmlib.GetAsmConvar("maxforce" , "FLT"))
|
local forcelim = mathClamp(pPly:GetInfoNum(gsToolPrefL.."forcelim", 0),0,asmlib.GetAsmConvar("maxforce" , "FLT"))
|
||||||
local activrad = mathClamp(pPly:GetInfoNum(gsToolPrefL.."activrad", 0),1,asmlib.GetAsmConvar("maxactrad", "FLT"))
|
local activrad = mathClamp(pPly:GetInfoNum(gsToolPrefL.."activrad", 0),0,asmlib.GetAsmConvar("maxactrad", "FLT"))
|
||||||
local trPos, trAng, trRad, trID, trTr = trEnt:GetPos(), trEnt:GetAngles(), activrad, 0
|
local trPos, trAng, trRad, trID, trTr = trEnt:GetPos(), trEnt:GetAngles(), activrad, 0
|
||||||
for ID = 1, trRec.Size, 1 do -- Hits distance shorter than the active radius
|
for ID = 1, trRec.Size, 1 do -- Hits distance shorter than the active radius
|
||||||
local oTr, oDt = asmlib.GetTraceEntityPoint(trEnt, ID, activrad)
|
local oTr, oDt = asmlib.GetTraceEntityPoint(trEnt, ID, activrad)
|
||||||
|
@ -2233,9 +2233,9 @@ function TOOL:DrawToolScreen(w, h)
|
|||||||
scrTool:DrawText("Holds Model: Valid","g")
|
scrTool:DrawText("Holds Model: Valid","g")
|
||||||
scrTool:DrawTextRe(" ["..gsModeDataB.."]","db")
|
scrTool:DrawTextRe(" ["..gsModeDataB.."]","db")
|
||||||
local trEnt = stTrace.Entity
|
local trEnt = stTrace.Entity
|
||||||
local workmode = self:GetWorkingMode()
|
|
||||||
local actrad = self:GetActiveRadius()
|
local actrad = self:GetActiveRadius()
|
||||||
local pointid, pnextid = self:GetPointID()
|
local pointid, pnextid = self:GetPointID()
|
||||||
|
local workmode, workname = self:GetWorkingMode()
|
||||||
local trMaxCN, trModel, trOID, trRLen
|
local trMaxCN, trModel, trOID, trRLen
|
||||||
if(trEnt and trEnt:IsValid()) then
|
if(trEnt and trEnt:IsValid()) then
|
||||||
if(asmlib.IsOther(trEnt)) then return end
|
if(asmlib.IsOther(trEnt)) then return end
|
||||||
@ -2267,19 +2267,18 @@ function TOOL:DrawToolScreen(w, h)
|
|||||||
.. " (" ..(pnextid or gsNoID)
|
.. " (" ..(pnextid or gsNoID)
|
||||||
..") [" ..(hdRec.Size or gsNoID).."]","g")
|
..") [" ..(hdRec.Size or gsNoID).."]","g")
|
||||||
scrTool:DrawText("MaxCL: "..actrad.." < ["..maxrad.."]","c")
|
scrTool:DrawText("MaxCL: "..actrad.." < ["..maxrad.."]","c")
|
||||||
scrTool:DrawText("CurAR: "..(trRLen or gsNoAV),"y")
|
|
||||||
local txW, txH = scrTool:GetTextStScreen()
|
local txW, txH = scrTool:GetTextStScreen()
|
||||||
local txsX, txsY = scrTool:GetTextStLast()
|
local txsX, txsY = scrTool:GetTextStLast()
|
||||||
local nRad = mathClamp(h - txH - (txsY / 2),0,h) / 2
|
scrTool:DrawText("Work: ["..workmode.."] "..workname, "wm")
|
||||||
local cPos = mathClamp(h - nRad - (txsY / 3),0,h)
|
scrTool:DrawText("CurAR: "..(trRLen or gsNoAV),"y")
|
||||||
|
local nRad = mathClamp(h - txH - txsY / 1.2,0,h) / 2
|
||||||
|
local cPos = mathClamp(h - nRad - txsY / 2.5,0,h)
|
||||||
local xyPs = asmlib.NewXY(cPos, cPos)
|
local xyPs = asmlib.NewXY(cPos, cPos)
|
||||||
local workmode, workname = self:GetWorkingMode()
|
|
||||||
scrTool:DrawCircle(xyPs, mathClamp(actrad/maxrad,0,1)*nRad, "c","SURF")
|
scrTool:DrawCircle(xyPs, mathClamp(actrad/maxrad,0,1)*nRad, "c","SURF")
|
||||||
scrTool:DrawCircle(xyPs, nRad, "m")
|
scrTool:DrawCircle(xyPs, nRad, "m")
|
||||||
scrTool:DrawText("Date: "..asmlib.GetDate(),"w")
|
scrTool:DrawText("Date: "..asmlib.GetDate(),"w")
|
||||||
scrTool:DrawText("Time: "..asmlib.GetTime())
|
scrTool:DrawText("Time: "..asmlib.GetTime())
|
||||||
if(trRLen) then scrTool:DrawCircle(xyPs, nRad * mathClamp(trRLen/maxrad,0,1),"y") end
|
if(trRLen) then scrTool:DrawCircle(xyPs, nRad * mathClamp(trRLen/maxrad,0,1),"y") end
|
||||||
scrTool:DrawText("Work: ["..workmode.."] "..workname, "wm")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Enter `spawnmenu_reload` in the console to reload the panel
|
-- Enter `spawnmenu_reload` in the console to reload the panel
|
||||||
|
Loading…
Reference in New Issue
Block a user