Skip to content

Commit

Permalink
Updated: Use log key notation for point also
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdvideo1234 committed Mar 31, 2024
1 parent 4fc6604 commit ea51f16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions lua/trackassembly/trackasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea51f16

Please sign in to comment.