FS#401 - Improved drag-placing of signals on non-diagonal tracks

Attached to Project: OpenTTD
Opened by d37373 (d37373) - Tuesday, 14 November 2006, 22:34 GMT
Last edited by Peter Nelson (peter1138) - Monday, 20 November 2006, 12:55 GMT
Type Patch
Category Core
Status New
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Currently, placing signals by dragging uses different spacing on diagonal and non-diagonal tracks. A patch setting of "Place a tile every 4" leaves a gap of 3 tile-lengths on diagonals but 3.5 on non-diagonals. This is because the signal itself only takes up half a length.

The attached code (diff from r7149) fixes this by reducing the counter by 1 on non-diagonal tracks, and coping with the associated change of track (TRACK_LEFT to TRACK_RIGHT, etc.)
This task depends upon