diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2020-12-18 21:44:11 +0000 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2020-12-18 21:44:11 +0000 |
commit | 8322f256c5c7f3f1fc6e64880d9a160286e0a0cb (patch) | |
tree | e7cae4afec7db87eb1778f78f60e4950e962930d | |
parent | 065c953eba3f2194d56e45f17dae0d4c40852a8e (diff) | |
parent | ba7eb19317651e4e02a8e9cec741192b3141f93e (diff) | |
download | pipeworks-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.lua | 2 |
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)), |