mirror of
https://github.com/dvdvideo1234/TrackAssemblyTool.git
synced 2025-03-04 03:13:32 -05:00
Improved: Ghosting control conditions
This commit is contained in:
parent
2105f812b8
commit
54b42533b0
@ -86,7 +86,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
|
||||
------------ CONFIGURE ASMLIB ------------
|
||||
|
||||
asmlib.InitBase("track","assembly")
|
||||
asmlib.SetOpVar("TOOL_VERSION","8.757")
|
||||
asmlib.SetOpVar("TOOL_VERSION","8.758")
|
||||
|
||||
------------ CONFIGURE GLOBAL INIT OPVARS ------------
|
||||
|
||||
|
@ -4957,6 +4957,7 @@ end
|
||||
function HasGhosts()
|
||||
if(SERVER) then return false end
|
||||
local tGho = GetOpVar("ARRAY_GHOST")
|
||||
if(not IsHere(tGho)) then return false end
|
||||
local eGho, nSiz = tGho[1], tGho.Size
|
||||
return (eGho and eGho:IsValid() and nSiz and nSiz > 0)
|
||||
end
|
||||
@ -4972,6 +4973,7 @@ function FadeGhosts(bNoD, nMrF)
|
||||
if(not HasGhosts()) then return true end
|
||||
local nMar = mathClamp((tonumber(nMrF) or 0), 0, 1)
|
||||
local tGho = GetOpVar("ARRAY_GHOST")
|
||||
if(not IsHere(tGho)) then return true end
|
||||
local cPal = GetContainer("COLORS_LIST")
|
||||
local sMis, sMo = GetOpVar("MISS_NOMD"), tGho.Slot
|
||||
for iD = 1, tGho.Size do local eGho = tGho[iD]
|
||||
@ -4995,6 +4997,7 @@ function ClearGhosts(vSiz, bCol)
|
||||
if(SERVER) then return true end
|
||||
local tGho = GetOpVar("ARRAY_GHOST")
|
||||
if(not IsHere(tGho)) then return true end
|
||||
if(tGho.Size == 0) then return true end
|
||||
local iSiz = mathCeil(tonumber(vSiz) or tGho.Size)
|
||||
local nDer = GetOpVar("DELAY_REMOVE")
|
||||
for iD = 1, iSiz do local eGho = tGho[iD]
|
||||
@ -5059,7 +5062,8 @@ end
|
||||
]]
|
||||
function NewGhosts(nCnt, sModel) -- Only he's not a shadow, he's a green ghost!
|
||||
if(SERVER) then return true end -- Ghosting is client side only
|
||||
local tGho = GetOpVar("ARRAY_GHOST") -- Read ghosts
|
||||
local tGho = GetOpVar("ARRAY_GHOST") -- Read ghosts stack array
|
||||
if(not IsHere(tGho)) then return true end -- Not available then nothing to do
|
||||
if(nCnt == 0 and tGho.Size == 0) then return true end -- Skip processing
|
||||
if(nCnt == 0 and tGho.Size ~= 0) then return ClearGhosts() end -- Disabled ghosting
|
||||
local iD = 1; FadeGhosts(true) -- Fade the current ghost stack
|
||||
|
Loading…
Reference in New Issue
Block a user