PilzAdam wrote:kpo wrote:The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
I dont know exactly how to reproduce this.
Ehm. Okay I am not sure how to attach an image. But imagine this:
B
(-x or -z) ==============C======================= (+x or +z)
<---- if the cart stops while moving this way it will move ----> this way when powered again.
'=' = long accelerate track
'B' = Mesecon Button (either the lever, switch or button) and mesecons to each and every piece of track
'C' = Cart
When the button is pressed the cart will move in the positive direction (+x or +z) and return when it reaches the end of the track - sort of bouncing back and forth if power is kept on.
IF the cart is stopping while travelling in the negative direction (-x or -z) it will reverse its direction when the tracks are powered again.
For ease of debugging this set the acceleration to be negative when the accelerate rail is off (that is the extra rail type I made here). That will cause the cart to stop when power is off.
As I write I suspect the code to be "positively inclined" towards the positive direction vector rather than saving the vector it came to a halt with.
Does that make any sense?