News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[112.3] Vehicle lengths not summing correctly for needed station size

Started by An_dz, May 19, 2014, 02:06:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

An_dz

Flemmbrav found this bug and I have tested it multiple times. Lowest tested version was stable 112.3.

The length of the convoy is not being summed correctly, it only works when using lengths 16 & 8, for example: (Read any real number as a vehicle with length X)

If I buy two 16, or three or four 8, or one 16 with one or two 8, it's calculated correctly and I need a station with two tiles.

But if I buy a 10 & 6, or a 12 & 4 I need two station tiles and not one.

I tested with multiple vehicles with length 2 and here's what I got:
1-5 vehicles: 1 tile
6-13 vehicles: 2 tiles
14-21 vehicles: 3 tiles
22-24 vehicles: 4 tiles

Flemmbrav found this bug because he got a convoy with 6+4+5 and it needed two station tiles and when he appended the same vehicles it still needed 2 tiles.

TurfIt

Intended. But you don't actually need that 'fake' length for loading. You can use the actual length as the length bars show, as long as you accept the rear may still be reserving the track tile before the station.
   // the last vehicle counts differently in stations and for reserving track
   // (1) add 8 = 127/256 tile to account for the driving in stations in north/west direction
   //     see at the end of vehikel_t::hop()
   // (2) for length of convoi for loading in stations the length of the last vehicle matters
   //     see convoi_t::hat_gehalten

An_dz

I don't understand why this is being calculated and specially only for north & west. Why steps_next is reduced to its half?

Dwachs

Parsley, sage, rosemary, and maggikraut.