OpenTTD

Tasklist

FS#6501 - after deleting an order which is target of a jump, the jump points to the previous order

Attached to Project: OpenTTD
Opened by Erich Eckner (deep42thought) - Saturday, 27 August 2016, 09:59 GMT
Type Bug
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

Details

Imho, deleting an order should behave the same as keeping that order in the queue but deleting/ignoring the instruction of the order.
However, deleting an order (say the n-th order), which is target of a (conditional) jump, the jump points to the (n-1)-st order (and not the n-th).

example of orders:
before:

1. always jump to order 3
2. go to waypoint1
3. go to waypoint2
4. go to waypoint3

after deleting order 3:
1. always jump to order 2
2. go to waypoint1
3. go to waypoint3

expected:
1. always jump to order 3
2. go to waypoint1
3. go to waypoint3

The current behaviour is unintuitive, since "waypoint1" was not reached before the deletion, but afterwards it is. In case the "n-th" is the last order, the target of the jump should change to 1.
Sry for not attaching a patch, but frankly I didn't understand the logic of what happens when I delete an order.

greetings,
deep42thought
This task depends upon

Loading...