aboutsummaryrefslogtreecommitdiff
path: root/trainlogic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'trainlogic.lua')
-rw-r--r--trainlogic.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/trainlogic.lua b/trainlogic.lua
index f7a9363..7d7fe9f 100644
--- a/trainlogic.lua
+++ b/trainlogic.lua
@@ -81,6 +81,10 @@ advtrains.save = function()
else
data.driver_name=nil
end
+ if data.discouple then
+ data.discouple.object:remove()
+ data.discouple=nil
+ end
end
--print(dump(advtrains.wagon_save))
datastr = minetest.serialize(advtrains.wagon_save)