Added mechanism to avoid double-detection

This commit is contained in:
Gabriel Pérez-Cerezo 2016-12-22 12:54:02 +01:00
parent 7a1c4990d9
commit b4b4936b15
No known key found for this signature in database
GPG Key ID: 90422B01A46D0B3E
1 changed files with 2 additions and 1 deletions

View File

@ -600,7 +600,8 @@ advtrains.register_tracks("default", {
local endsp = train.tarvelocity;
train.tarvelocity = 0;
train.velocity = 0;
minetest.after(10,function(t,sp) train.movedir = -train.movedir; t.tarvelocity=sp; end, train, endsp);
minetest.swap_node(pos, {name="advtrains:dtrack".."_"..suffix..rotation, param2=minetest.get_node(pos).param2})
minetest.after(10,function(t,sp,pos) train.movedir = -train.movedir; t.tarvelocity=sp; minetest.swap_node(pos, {name="advtrains:dtrack_stop".."_"..suffix..rotation, param2=minetest.get_node(pos).param2}); end, train, endsp,pos);
end
}
}