From 8ef6e9a52924a77b7479690817d416eb2e85722f Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 17 Jan 2018 20:15:06 +0100 Subject: Fix crash IDK why this happens, but it's not important. --- advtrains/couple.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3