{{ message }}

# Wrong distance between signals with «Drag signal distance» #8797

Closed
opened this issue Mar 2, 2021 · 3 comments
Closed

# Wrong distance between signals with «Drag signal distance» #8797

opened this issue Mar 2, 2021 · 3 comments

## Version of OpenTTD

Any with drag signal option

## Expected result

Signal every N or N-0.5 tile
Tested by drag signal distance = 1, 2 and 3, but works for any
Expected gaps marked with green and yellow rails

## Actual result

Signal each N tile on straight track and each N+0.5 if gap contains diagonal tiles
Red tracks – gap over expections.

## Steps to reproduce

Build some random connected tracks without juctions, get signals menu, change «Drag signal distance» in signals menu (let it be N) and build signals with ctrl+drag. Then count pieces of tracks between each signal. Straight piece of track = 1, diagonal (track on corner of tile) = 0.5. You must get N-1 on straight tracks and N-0.5 if gap contains diagonal pieces.

For common players it's not a problem, but when network contains a lot of trains with tight flow (openttdcoop style) any unexpected gap can be bottleneck of all network. For now the only solution is manually build every signal on diagonal track.
Multicolored tracks is PURR NewGRF, it has absolutely no effect on the placement of signals

### ldpl commented Mar 2, 2021 • edited

 I'll try to paraphrase the issue as I understand it. Because of how signals are placed in OpenTTD it's not always possible to keep a consistent signal gap where straight tracks connect with diagonal ones. So what signal placer does is making gap half a tile larger when turning from straight to diagonal and half a tile smaller when turning back. And while shortening the gap is usually not an issue, suddenly enlarging the gap is as it stops trains that were happily following others before it. So a fix, in this case, would be to make the signal placement tool shorten the gap in all cases where it couldn't keep the gap consistent. BTW. It even enlarges the gap needlessly sometimes: UPD It seems that another part of this issue is that the straight track piece has a logical length of 192 units while the diagonal one 128 (256 for two halves). And signal placer uses the visual gap instead of the logical one.

### LC-Zorg commented Mar 10, 2021

 In the case of signals every 1, it won't look good. :/ It would be necessary to move the signals that stand on the inside of the field towards its center in order to keep equal distances. This, in turn, might not look great with some NewGRFs adding other signaling. I would see a solution for maintaining traffic flow other than not the best looking compaction of signals. A train entering the section at the end of which there is a red light of a block or pre-signal, would immediately start braking, which would be gentler and spread over the entire section. As a result, on the one hand braking would look much more natural, and on the other hand, slowing down instead of suddenly stopping the train would make the traffic smoother.

added a commit to ldpl/OpenTTD that referenced this issue Oct 24, 2021
``` Fix OpenTTD#8797: Use logical rail length when placing signals ```
``` bfc8d41 ```
added a commit to ldpl/OpenTTD that referenced this issue Oct 24, 2021
``` Fix OpenTTD#8797: Use logical rail length when placing signals ```
``` 59d7c1c ```
mentioned this issue Oct 24, 2021
closed this in ``` 54951e3 ``` Nov 19, 2021