Changed: Equalize the version and add mode dividers in POA

This commit is contained in:
dvdvideo1234 2024-03-30 14:14:39 +02:00
parent ad93c4ce01
commit 24ff13a431
2 changed files with 7 additions and 7 deletions

View File

@ -84,7 +84,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.749") asmlib.SetOpVar("TOOL_VERSION","8.743")
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)

View File

@ -2254,7 +2254,7 @@ function LocatePOA(oRec, ivPoID)
local sD = GetOpVar("OPSYM_DISABLE") -- Use for searched hit point disabled local sD = GetOpVar("OPSYM_DISABLE") -- Use for searched hit point disabled
for ID = 1, oRec.Size do local tOA = oRec.Offs[ID] -- Index current offset for ID = 1, oRec.Size do local tOA = oRec.Offs[ID] -- Index current offset
local sP, sO, sA = tOA.P.Slot, tOA.O.Slot, tOA.A.Slot -- Localize transform index local sP, sO, sA = tOA.P.Slot, tOA.O.Slot, tOA.A.Slot -- Localize transform index
---------- Origin ---------- -------------------- Origin --------------------
if(sO and sO:sub(1,1) == sE) then -- POA origin must extracted from the model if(sO and sO:sub(1,1) == sE) then -- POA origin must extracted from the model
local sO = sO:sub(2, -1) -- Read origin transform ID and try to index local sO = sO:sub(2, -1) -- Read origin transform ID and try to index
local vO, aA = GetTransformOA(oRec.Slot, sO) -- Read transform position/angle local vO, aA = GetTransformOA(oRec.Slot, sO) -- Read transform position/angle
@ -2267,7 +2267,7 @@ function LocatePOA(oRec, ivPoID)
LogInstance("Origin transfer fail "..GetReport(ID, oRec.Slot)) end LogInstance("Origin transfer fail "..GetReport(ID, oRec.Slot)) end
LogInstance("Origin transform from model "..GetReport3(ID, sO, StringPOA(tOA.O, "V"))) LogInstance("Origin transform from model "..GetReport3(ID, sO, StringPOA(tOA.O, "V")))
end -- Transform origin is decoded from the model and stored in the cache end -- Transform origin is decoded from the model and stored in the cache
---------- Angle ---------- -------------------- Angle --------------------
if(sA and sA:sub(1,1) == sE) then -- POA angle must extracted from the model if(sA and sA:sub(1,1) == sE) then -- POA angle must extracted from the model
local sA = sA:sub(2, -1) -- Read angle transform ID and try to index local sA = sA:sub(2, -1) -- Read angle transform ID and try to index
local vO, aA = GetTransformOA(oRec.Slot, sA) -- Read transform position/angle local vO, aA = GetTransformOA(oRec.Slot, sA) -- Read transform position/angle
@ -2280,7 +2280,7 @@ function LocatePOA(oRec, ivPoID)
LogInstance("Angle mismatch fail "..GetReport2(ID, oRec.Slot)) end LogInstance("Angle mismatch fail "..GetReport2(ID, oRec.Slot)) end
LogInstance("Angle transform from model "..GetReport3(ID, sA, StringPOA(tOA.A, "A"))) LogInstance("Angle transform from model "..GetReport3(ID, sA, StringPOA(tOA.A, "A")))
end -- Transform angle is decoded from the model and stored in the cache end -- Transform angle is decoded from the model and stored in the cache
---------- Point ---------- -------------------- Point --------------------
if(sP:sub(1,1) == sD) then -- Check whenever point is disabled if(sP:sub(1,1) == sD) then -- Check whenever point is disabled
ReloadPOA(tOA.O[cvX], tOA.O[cvY], tOA.O[cvZ]) -- Override with the origin ReloadPOA(tOA.O[cvX], tOA.O[cvY], tOA.O[cvZ]) -- Override with the origin
else -- When the point is disabled take the origin otherwise try to process it else -- When the point is disabled take the origin otherwise try to process it
@ -2316,7 +2316,7 @@ function RegisterPOA(stData, ivID, sP, sO, sA)
LogInstance("Scatter ID #"..tostring(iID)); return nil end LogInstance("Scatter ID #"..tostring(iID)); return nil end
tOffs[iID] = {}; tOffs[iID].P = {}; tOffs[iID].O = {}; tOffs[iID].A = {}; tOffs = tOffs[iID] tOffs[iID] = {}; tOffs[iID].P = {}; tOffs[iID].O = {}; tOffs[iID].A = {}; tOffs = tOffs[iID]
end; local sE, sD = GetOpVar("OPSYM_ENTPOSANG"), GetOpVar("OPSYM_DISABLE") end; local sE, sD = GetOpVar("OPSYM_ENTPOSANG"), GetOpVar("OPSYM_DISABLE")
---------- Origin ---------- -------------------- Origin --------------------
if(sO:sub(1,1) == sD) then ReloadPOA() else if(sO:sub(1,1) == sD) then ReloadPOA() else
if(sO:sub(1,1) == sE) then -- To be decoded on spawn via locating if(sO:sub(1,1) == sE) then -- To be decoded on spawn via locating
stData.Tran = true; ReloadPOA(); tOffs.O.Slot = sO -- Store transform stData.Tran = true; ReloadPOA(); tOffs.O.Slot = sO -- Store transform
@ -2325,7 +2325,7 @@ function RegisterPOA(stData, ivID, sP, sO, sA)
if(not DecodePOA(sO)) then LogInstance("Origin mismatch "..GetReport2(iID, stData.Slot)) end if(not DecodePOA(sO)) then LogInstance("Origin mismatch "..GetReport2(iID, stData.Slot)) end
end end
end; if(not IsHere(TransferPOA(tOffs.O, "V"))) then LogInstance("Origin transfer fail"); return nil end end; if(not IsHere(TransferPOA(tOffs.O, "V"))) then LogInstance("Origin transfer fail"); return nil end
---------- Angle ---------- -------------------- Angle --------------------
if(sA:sub(1,1) == sD) then ReloadPOA() else if(sA:sub(1,1) == sD) then ReloadPOA() else
if(sA:sub(1,1) == sE) then -- To be decoded on spawn via locating if(sA:sub(1,1) == sE) then -- To be decoded on spawn via locating
stData.Tran = true; ReloadPOA(); tOffs.A.Slot = sA -- Store transform stData.Tran = true; ReloadPOA(); tOffs.A.Slot = sA -- Store transform
@ -2334,7 +2334,7 @@ function RegisterPOA(stData, ivID, sP, sO, sA)
if(not DecodePOA(sA)) then LogInstance("Angle mismatch "..GetReport2(iID, stData.Slot)) end if(not DecodePOA(sA)) then LogInstance("Angle mismatch "..GetReport2(iID, stData.Slot)) end
end end
end; if(not IsHere(TransferPOA(tOffs.A, "A"))) then LogInstance("Angle transfer fail"); return nil end end; if(not IsHere(TransferPOA(tOffs.A, "A"))) then LogInstance("Angle transfer fail"); return nil end
---------- Point ---------- -------------------- Point --------------------
if(tOffs.O.Slot) then -- Origin transform point trigger if(tOffs.O.Slot) then -- Origin transform point trigger
stData.Tran = true; ReloadPOA(); tOffs.P.Slot = sP stData.Tran = true; ReloadPOA(); tOffs.P.Slot = sP
elseif(sP:sub(1,1) == sD) then -- Point is disabled elseif(sP:sub(1,1) == sD) then -- Point is disabled