aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-07-17 21:15:34 +0200
committerorwell96 <orwell@bleipb.de>2018-07-17 21:19:52 +0200
commitf84103959ba706260556dc55c5eb90aa7dac1b4d (patch)
tree424149cdb35b6d52f7acb6501e23ccdae4d58da9
parente6700c5c7d0e1e8afb8f6fd5021b50f645655588 (diff)
downloadadvtrains-f84103959ba706260556dc55c5eb90aa7dac1b4d.tar.gz
advtrains-f84103959ba706260556dc55c5eb90aa7dac1b4d.tar.bz2
advtrains-f84103959ba706260556dc55c5eb90aa7dac1b4d.zip
Fix some incompatibility crash for old worlds
-rw-r--r--advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
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