pipeworks failing to vector multiply

Post Reply
thetoolman
New member
Posts: 6
Joined: Sat Nov 24, 2018 18:45
GitHub: tealethetoolman
IRC: thetoolman

pipeworks failing to vector multiply

by thetoolman » Post

I made a digtron that digs and places a row of technic quarrys. it made a few rows of these and i started a few up and then i lost my world to some bug. anyone want to give me a hand trying to figure this out?

error output
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'pipeworks' in callback environment_Step(): /usr/local/share/minetest/builtin/common/vector.lua:122: attempt to index local 'a' (a nil value)
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: stack traceback:
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: /usr/local/share/minetest/builtin/common/vector.lua:122: in function 'multiply'
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: /home/teale/.minetest/mods/pipeworks/luaentity.lua:346: in function 'move_entities_globalstep_part2'
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: /home/teale/.minetest/mods/pipeworks/luaentity.lua:377: in function '?'
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
May 03 20:22:15 mine minetestserver[18141]: 2020-05-03 20:22:15: ERROR[Main]: stack traceback:

gpcf
Member
Posts: 363
Joined: Fri May 27, 2016 10:48
In-game: gabriel

Re: pipeworks failing to vector multiply

by gpcf » Post

Try this hotfix:

Code: Select all

diff --git a/luaentity.lua b/luaentity.lua
index c11c030..02e0b6f 100644
--- a/luaentity.lua
+++ b/luaentity.lua
@@ -335,6 +335,9 @@ local move_entities_globalstep_part2 = function(dtime)
                        entity._velocity = master_entity:get_velocity()
                        entity._acceleration = master_entity:get_acceleration()
                else
+                       if not entity._acceleration or entity._acceleration == 0 then
+                               entity._acceleration = {x=0,y=0,z=0}
+                       end
                        entity._pos = vector.add(vector.add(
                                entity._pos,
                                vector.multiply(entity._velocity, dtime)),


Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests