diff options
author | orwell96 <mono96.mml@gmail.com> | 2018-01-17 20:15:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 20:15:06 +0100 |
commit | 8ef6e9a52924a77b7479690817d416eb2e85722f (patch) | |
tree | 32ac27bd4e95d8f5ab69ae18891e74c78efa86c5 | |
parent | fa7f05fd0cc3d4824a442cfab62d01e349b2e296 (diff) | |
download | advtrains-8ef6e9a52924a77b7479690817d416eb2e85722f.tar.gz advtrains-8ef6e9a52924a77b7479690817d416eb2e85722f.tar.bz2 advtrains-8ef6e9a52924a77b7479690817d416eb2e85722f.zip |
Fix crash
IDK why this happens, but it's not important.
-rw-r--r-- | advtrains/couple.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua index a102254..6a06077 100644 --- a/advtrains/couple.lua +++ b/advtrains/couple.lua @@ -56,7 +56,7 @@ minetest.register_entity("advtrains:discouple", { self.object:remove() return end - if self.wagon.old_velocity > 0 or self.wagon.pos_in_trainparts==1 then + if (self.wagon.old_velocity and self.wagon.old_velocity > 0) or self.wagon.pos_in_trainparts==1 then self.object:remove() end atprintbm("discouple_step", t) |