From ea51f16b11a7ada537b2bbeae6079791a1ef85ba Mon Sep 17 00:00:00 2001 From: dvdvideo1234 Date: Sun, 31 Mar 2024 23:19:06 +0300 Subject: [PATCH] Updated: Use log key notation for point also --- lua/autorun/trackassembly_init.lua | 2 +- lua/trackassembly/trackasmlib.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 0e9fa697..e4a0214f 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -84,7 +84,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present ------------ CONFIGURE ASMLIB ------------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","8.745") +asmlib.SetOpVar("TOOL_VERSION","8.746") asmlib.SetIndexes("V" ,1,2,3) asmlib.SetIndexes("A" ,1,2,3) asmlib.SetIndexes("WV",1,2,3) diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index 1b898f67..b5e40938 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -2294,12 +2294,12 @@ function LocatePOA(oRec, ivPoID) elseif(IsNull(sP) or IsBlank(sP)) then -- In case of empty value or null use the origin ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) -- Override with the origin elseif(sP:sub(1,1) == sE) then -- POA point must extracted from the model - local sP = sP:sub(2, -1) -- Read point transform ID and try to index - local vP = GetAttachmentByID(oRec.Slot, sP) -- Read transform point + local sK = sP:sub(2, -1) -- Read point transform ID and try to index + local vP = GetAttachmentByID(oRec.Slot, sK) -- Read transform point if(IsHere(vP)) then ReloadPOA(vP[cvX], vP[cvY], vP[cvZ]) -- Load point into POA else -- Try decoding the transform point when not applicable - if(IsNull(sP) or IsBlank(sP)) then ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) else - if(not DecodePOA(sP)) then LogInstance("Point mismatch "..GetReport2(ID, oRec.Slot)) end + if(IsNull(sK) or IsBlank(sK)) then ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) else + if(not DecodePOA(sK)) then LogInstance("Point mismatch "..GetReport2(ID, oRec.Slot)) end end end -- Decode the transformation when is not null or empty string else -- When the point is empty use the origin otherwise decode the value if(not DecodePOA(sP)) then LogInstance("Point mismatch "..GetReport2(ID, oRec.Slot)) end