Nanolasers not rendering
I have my construction effect set to beam. When anything is being built, the nanolaser doesn't show up, and the console keeps spitting this out:
[t=00:01:10.701306][f=0000306] Error: gl.BeginEnd: error(2) = [string "lups/ParticleClasses/nanolasersnoshader.lua"]:122: bad argument #1 to 'unpack' (table expected, got number)
[t=00:01:10.701372][f=0000306] Error: [LuaRules::RunCallInTraceback] error=2 (LUA_ERRRUN) callin=DrawWorld trace=[Internal Lua error: Call failure] [string "lups/ParticleClasses/nanolasersnoshader.lua"]:122: bad argument #1 to 'unpack' (table expected, got number)
Related #5512, but I couldn't reproduce.
One of these unpacks is a number
if Spring.Utilities.IsNanOrInf(unpack(start_dir)) or
Spring.Utilities.IsNanOrInf(unpack(end_dir)) or
Spring.Utilities.IsNanOrInf(unpack(dir_upright1)) then
However, all three are return values of Vmul, and Vmul always returns a table.
function Vmul(a,b)
local u,w
if (type(a) == "table") then
u,w = a,b
else
u,w = b,a
end
local v = {}
for i=1,#u do v[i] = w*u[i] end
return v
end
Basically, this specific error seems impossible, so I want to gather more echos. @kleptovoid it would really help if you could test the dev version by doing !game zk:test in a custom room, then posting the new error.
Appears to work fine. Though I get the issue on v1.13.4.3, doing it on test-19992-6f5934a renders the nanobeam properly and the console no longer outputs an error.
Spooky.