Fix detector rails rotating when a train passes

This commit is contained in:
orwell96 2016-11-11 14:45:43 +01:00
parent 7b357883b3
commit 46a4f22647
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -486,7 +486,7 @@ if mesecon then
},
advtrains = {
on_train_enter=function(pos, train_id)
minetest.swap_node(pos, {name="advtrains:dtrack_detector_on".."_"..suffix..rotation})
minetest.swap_node(pos, {name="advtrains:dtrack_detector_on".."_"..suffix..rotation, param2=minetest.get_node(pos).param2})
mesecon.receptor_on(pos, advtrains.meseconrules)
end
}
@ -511,7 +511,7 @@ if mesecon then
},
advtrains = {
on_train_leave=function(pos, train_id)
minetest.swap_node(pos, {name="advtrains:dtrack_detector_off".."_"..suffix..rotation})
minetest.swap_node(pos, {name="advtrains:dtrack_detector_off".."_"..suffix..rotation, param2=minetest.get_node(pos).param2})
mesecon.receptor_off(pos, advtrains.meseconrules)
end
}