diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2020-07-19 22:57:29 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2020-07-19 22:57:29 +0200 |
commit | 7de2a9142f0b27f2b03235a6a47d9e2f02245852 (patch) | |
tree | d921fa94887d8fac215b929c912940a92f7dbf8e /advtrains/trainlogic.lua | |
parent | 3040c53413a5ddb7e0e84f02f85de7868510c889 (diff) | |
parent | 19509acf56aef4b6e5f45023ee5603e95822fe69 (diff) | |
download | advtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.tar.gz advtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.tar.bz2 advtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.zip |
Merge branch 'master' of bananach.space:advtrains
Diffstat (limited to 'advtrains/trainlogic.lua')
-rw-r--r-- | advtrains/trainlogic.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index 6155768..3e57db2 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -851,7 +851,7 @@ function advtrains.update_trainpart_properties(train_id, invert_flipstate) end -local ablkrng = minetest.settings:get("active_block_range")*16 +local ablkrng = advtrains.wagon_load_range -- This function checks whether entities need to be spawned for certain wagons, and spawns them. -- Called from train_step_*(), not required to check init. function advtrains.spawn_wagons(train_id) @@ -862,7 +862,7 @@ function advtrains.spawn_wagons(train_id) local data = advtrains.wagons[w_id] if data then if data.train_id ~= train_id then - atwarn("Train",train_id,"Wagon #",1,": Saved train ID",data.train_id,"did not match!") + atwarn("Train",train_id,"Wagon #",i,": Saved train ID",data.train_id,"did not match!") data.train_id = train_id end if not advtrains.wagon_objects[w_id] or not advtrains.wagon_objects[w_id]:getyaw() then @@ -878,6 +878,7 @@ function advtrains.spawn_wagons(train_id) end if spawn then + --atdebug("wagon",w_id,"spawning") local wt = advtrains.get_wagon_prototype(data) local wagon = minetest.add_entity(pos, wt):get_luaentity() wagon:set_id(w_id) |