From 0ee93973cbfb33028728f692119fc669382baeaa Mon Sep 17 00:00:00 2001 From: dvdvideo1234 Date: Tue, 12 Jan 2021 14:00:08 +0200 Subject: [PATCH] Fixed: Misconception when leaving the active point origin empty Updated: Desynchronization point ID warning when POA is registered --- data/trackassembly/set/z_autorun_[trackassembly].txt | 8 ++++---- data/trackassembly/set/z_autoset_[trackassembly].txt | 6 +++--- lua/autorun/trackassembly_init.lua | 10 +++++++--- lua/autorun/z_autorun_[shinji85_s_rails].lua | 6 +++--- lua/trackassembly/trackasmlib.lua | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/data/trackassembly/set/z_autorun_[trackassembly].txt b/data/trackassembly/set/z_autorun_[trackassembly].txt index d657addd..8e5e72a5 100644 --- a/data/trackassembly/set/z_autorun_[trackassembly].txt +++ b/data/trackassembly/set/z_autorun_[trackassembly].txt @@ -184,14 +184,14 @@ if(asmlib) then * Use that to swap the active points around by only moving the desired row up or down. * For the example table definition below, the line ID in the database will be the same. * POINT > This is the local position vector that TA searches and selects the related - * ORIGIN for. An empty string is treated as taking the ORIGIN. + * ORIGIN for. An empty or disabled string is treated as taking the ORIGIN. * Disabling this using the disable event makes it hidden when the active point is searched for * ORIGIN > This is the origin relative to which the next track piece position is calculated - * An empty string is treated as {0,0,0}. Disabling this makes it non-selectable by the holder - * You can also fill it with attachment event /!/ followed by your attachment name. + * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * ANGLE > This is the angle relative to which the forward and up vectors are calculated. * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} - * You can also fill it with attachment event /!/ followed by your attachment name. + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * CLASS > This string is populated up when your entity class is not /prop_physics/ but something else * used by ents.Create of the gmod ents API library. Keep this empty if your stuff is a normal prop. ]]-- diff --git a/data/trackassembly/set/z_autoset_[trackassembly].txt b/data/trackassembly/set/z_autoset_[trackassembly].txt index 3425c5d9..fb8cfeef 100644 --- a/data/trackassembly/set/z_autoset_[trackassembly].txt +++ b/data/trackassembly/set/z_autoset_[trackassembly].txt @@ -115,11 +115,11 @@ if(asmlib) then * ORIGIN for. An empty string is treated as taking the ORIGIN. * Disabling this using the disable event makes it hidden when the active point is searched for * ORIGIN > This is the origin relative to which the next track piece position is calculated - * An empty string is treated as {0,0,0}. Disabling this makes it non-selectable by the holder - * You can also fill it with attachment event /!/ followed by your attachment name. + * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * ANGLE > This is the angle relative to which the forward and up vectors are calculated. * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} - * You can also fill it with attachment event /!/ followed by your attachment name. + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * CLASS > This string is populated up when your entity class is not /prop_physics/ but something else * used by ents.Create of the gmod ents API library. Keep this empty if your stuff is a normal prop. ]]-- diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index f57668db..4ddf64f9 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -88,7 +88,7 @@ local gtInitLogs = {"*Init", false, 0} ------------ CONFIGURE ASMLIB ------------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","8.641") +asmlib.SetOpVar("TOOL_VERSION","8.642") asmlib.SetIndexes("V" ,1,2,3) asmlib.SetIndexes("A" ,1,2,3) asmlib.SetIndexes("WV",1,2,3) @@ -1630,8 +1630,12 @@ if(CLIENT) then end --[[ Track pieces parametrization legend - * Disabling of a component is preformed by using "OPSYM_DISABLE" - * Disabling A - The ID angle is treated as {0,0,0} + * Utilizing a trasnform attacment is done by using "OPSYM_ENTPOSANG" + * Disabling a component is preformed by using "OPSYM_DISABLE" + * Active points data are strings of floats delimited by "OPSYM_SEPARATOR" + * Disabling P - The ID search point is treated as taking the origin + * Disabling O - The ID snap origin is treated as {0,0,0} vector + * Disabling A - The ID snap angle is treated as {0,0,0} angle * Disabling Type - Makes it use the value of Categorize() * Disabling Name - Makes it generate it using the model via ModelToName() * Disabling Class - Makes it use the default /prop_physics/ diff --git a/lua/autorun/z_autorun_[shinji85_s_rails].lua b/lua/autorun/z_autorun_[shinji85_s_rails].lua index 6ecb8f79..478e9e04 100644 --- a/lua/autorun/z_autorun_[shinji85_s_rails].lua +++ b/lua/autorun/z_autorun_[shinji85_s_rails].lua @@ -175,11 +175,11 @@ if(asmlib) then * ORIGIN for. An empty string is treated as taking the ORIGIN. * Disabling this using the disable event makes it hidden when the active point is searched for * ORIGIN > This is the origin relative to which the next track piece position is calculated - * An empty string is treated as {0,0,0}. Disabling this makes it non-selectable by the holder - * You can also fill it with attachment event /!/ followed by your attachment name. + * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * ANGLE > This is the angle relative to which the forward and up vectors are calculated. * An empty string is treated as {0,0,0}. Disabling this also makes it use {0,0,0} - * You can also fill it with attachment event /!/ followed by your attachment name. + * You can also fill it with attachment event /!/ followed by your attachment name. It's mandatory * CLASS > This string is populated up when your entity class is not /prop_physics/ but something else * used by ents.Create of the gmod ents API library. Keep this empty if your stuff is a normal prop. ]]-- diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index 9f799dcb..b4c201d8 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -2103,7 +2103,7 @@ function RegisterPOA(stPiece, ivID, sP, sO, sA) LogInstance("Exists ID #"..tostring(iID)); return nil else if((iID > 1) and (not tOffs[iID - 1])) then - LogInstance("No sequential ID #"..tostring(iID - 1)); return nil end + LogInstance("Desynchronized ID #"..tostring(iID)); return nil end tOffs[iID] = {}; tOffs[iID].P = {}; tOffs[iID].O = {}; tOffs[iID].A = {}; tOffs = tOffs[iID] end; local sE, sD = GetOpVar("OPSYM_ENTPOSANG"), GetOpVar("OPSYM_DISABLE") ---------- Origin ----------