From f84103959ba706260556dc55c5eb90aa7dac1b4d Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 17 Jul 2018 21:15:34 +0200 Subject: Fix some incompatibility crash for old worlds --- advtrains/trainlogic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains') diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index 449d624..741d5fb 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -637,7 +637,7 @@ function advtrains.update_trainpart_properties(train_id, invert_flipstate) if not wagon then if advtrains.wagon_save[w_id] then --spawn a new and initialize it with the properties from wagon_save - wagon=minetest.add_entity(train.last_pos, advtrains.wagon_save[w_id].entity_name):get_luaentity() + wagon=minetest.add_entity(train.last_pos, advtrains.wagon_save[w_id].entity_name or advtrains.wagon_save[w_id].type):get_luaentity() if not wagon then minetest.chat_send_all("[advtrains] Warning: Wagon "..advtrains.wagon_save[w_id].entity_name.." does not exist. Make sure all required modules are loaded!") else -- cgit v1.2.3