summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2020-12-18 21:44:11 +0000
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2020-12-18 21:44:11 +0000
commit8322f256c5c7f3f1fc6e64880d9a160286e0a0cb (patch)
treee7cae4afec7db87eb1778f78f60e4950e962930d
parent065c953eba3f2194d56e45f17dae0d4c40852a8e (diff)
parentba7eb19317651e4e02a8e9cec741192b3141f93e (diff)
downloadpipeworks-8322f256c5c7f3f1fc6e64880d9a160286e0a0cb.tar
pipeworks-8322f256c5c7f3f1fc6e64880d9a160286e0a0cb.tar.gz
pipeworks-8322f256c5c7f3f1fc6e64880d9a160286e0a0cb.tar.bz2
pipeworks-8322f256c5c7f3f1fc6e64880d9a160286e0a0cb.tar.xz
pipeworks-8322f256c5c7f3f1fc6e64880d9a160286e0a0cb.zip
Merge branch 'master' into 'master'
Prevent the symptoms of Issue #33 See merge request VanessaE/pipeworks!31
-rw-r--r--luaentity.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/luaentity.lua b/luaentity.lua
index 8385264..6e75eeb 100644
--- a/luaentity.lua
+++ b/luaentity.lua
@@ -340,6 +340,8 @@ local move_entities_globalstep_part2 = function(dtime)
entity._velocity = master_entity:get_velocity()
entity._acceleration = master_entity:get_acceleration()
else
+ entity._velocity = entity._velocity or vector.new(0,0,0)
+ entity._acceleration = entity._acceleration or vector.new(0,0,0)
entity._pos = vector.add(vector.add(
entity._pos,
vector.multiply(entity._velocity, dtime)),