Hi. I have very complex saegame and there I sometimes experience, that a train is longer than it should be. The train have one BR 155 engine and 13 Goods Flachwagen. The declared length is 7 tiles. The most of the trains are that length but sometimes appears one or two, which takes a tile more. The tile is usualy in a crossings just before the station and block the track for all trains. The trian takes a tile more at all stations it stops. The only help is to send it to depot and dissasemble it. I can send a savegame, but it is a bit big.
I've noticed that one too! I just add an extra tracktile to the station to avoid problems. The train will load 100% in these cases, so every wagon is inside the station, but the track behind it just stays reserved.
This is due to the internal movement code. Any fix to this has 1001 error in other places.
How about working around this by changing the display of (the number of) required tiles in the depot, only for those cases where it is needed?
I did some experiments. The problem is a property of train (convoy). If a trains "overtakes" in one station, it will do it everywhere. When I send the train to the depot, remove the last wagon and then put it back, the train got repaired. MAybe you coud add some "just stopped" test, which could re-count the tiles and free the last one, if it is overstepped.
The problem should occur only in north and east directions, but not south or west.
But why this problem doesn't happen to all same convoi ?
Front convoi of attached image doesn't have problem. Only this convoi turned direction.
I think older version of simutrans didn't have this problem.
So, this should be a bug.
Does this help?
Index: simconvoi.cc
===================================================================
--- simconvoi.cc (revision 2615)
+++ simconvoi.cc (working copy)
@@ -589,7 +589,7 @@
// now actually move the units
while(sp_soll>>12) {
uint32 sp_hat = fahr[0]->fahre_basis(1<<12);
- int v_nr = get_vehicle_at_length((steps_driven++)>>4);
+ int v_nr = get_vehicle_at_length((++steps_driven)>>4);
// stop when depot reached
if(state==INITIAL) {
break;
At least for me, it does! How do you found this? :award:
Thank you. It solved my problem above.
Maybe, we confounded this topic's problem with old known problem (http://archive.forum.simutrans.com/topic/07246.0/index.html). :)
Lets wait for prissi's opinion 8)
This looks good, although I did not look at the code for a month or so, so everything is from memory. I suppose this is the problem with 127/255 internal steps, which of course do not match, especially with the above wrong statement. Better to do this in two lines anyway, I suppose.
This patch had been denied ?
Someone will write a different solution to solve this problem ?
I don't know. It would be the first one to be proud member of "denied patches" board :)
The bug with too short trains at a signal is unsolved,obviously. However, please, Dwachs you can submit too. Please submit your own bugfixes.
incorporated in 2644.