Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimise gaps between signals when dragging #3660

Closed
DorpsGek opened this issue Mar 5, 2010 · 11 comments
Closed

minimise gaps between signals when dragging #3660

DorpsGek opened this issue Mar 5, 2010 · 11 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Mar 5, 2010

adf88 opened the ticket and wrote:

"When you use the function to automatically build signals on a track with a choosen density, you end up having really large blocks around tunnels or bridges, because signals are simply left out." (Buhmann)
This patch modifies signal placing algorithm to left these gaps as small as possible. Something similar was written some time ago by Buhmann: http://www.tt-forums.net/viewtopic.php?f=33&t=35443
Patch I wrote is simpler and works better :) .

Introduced rules (when iterating track piece by track piece):
- place new signal if lastly placed signal is further then given density
- if signal can't be placed (if cmd fails), place it at the last possible position
- (optional) place signal if we are N*density tiles after the first tile (fixed distance)

Screenshot attached.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3660
@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

adf88 wrote:

"is further then given density" - it should be "is distanced by given density or more"
I'm also attaching preview showing which rules were applied at which signals:

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7654

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

Yexo wrote:

As it is now the patch will cause desycns, _settings_client.gui.drag_signals_fixed_distance should be a parameter of the command. I'm not so sure about the behavior of the "at fixed interval" setting. I think I'd rather have a switch between "minimize signal distance" and "only at fixed interval (=current behavior)".


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7655

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

adf88 wrote:

I forgot to notice - it won't work with non-patched server


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7656

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

adf88 wrote:

"I think I'd rather have a switch between "minimize signal distance" and "only at fixed interval (=current behavior)"." - Yexo
Are you sure? ;) People who want to have signals distanced by fixed interval (because of "nice" look) wouldn't be able to use "minimise gaps" feature. We could create two separated options, but why somebody would like to resign with "minimise gaps" feature? Second option would be useless.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7657

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

Yexo wrote:

The desync has nothing to do with the server being patched or not. _settings_client.gui.drag_signals_fixed_distance can be different on all clients but you use it in a command function.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7658

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 5, 2010

adf88 wrote:

Yes, yes, I'll fix that.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7659

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 6, 2010

adf88 wrote:

Fixed version:

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment7662

@DorpsGek
Copy link
Member Author

adf88 wrote:

An update.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment10226

@DorpsGek
Copy link
Member Author

adf88 wrote:

Further updates on the forum
http://www.tt-forums.net/viewtopic.php?f=33&t=35443


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment10602

@DorpsGek
Copy link
Member Author

adf88 wrote:


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660#comment10603

@DorpsGek
Copy link
Member Author

michi_cc closed the ticket.

Reason for closing: Implemented

In r24129.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3660

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant