Fix order destination refcount accounting for shared orders
This commit is contained in:
@@ -63,6 +63,7 @@ void IntialiseOrderDestinationRefcountMap()
|
|||||||
ClearOrderDestinationRefcountMap();
|
ClearOrderDestinationRefcountMap();
|
||||||
const Vehicle *v;
|
const Vehicle *v;
|
||||||
FOR_ALL_VEHICLES(v) {
|
FOR_ALL_VEHICLES(v) {
|
||||||
|
if (v != v->FirstShared()) continue;
|
||||||
const Order *order;
|
const Order *order;
|
||||||
FOR_VEHICLE_ORDERS(v, order) {
|
FOR_VEHICLE_ORDERS(v, order) {
|
||||||
if (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT)) {
|
if (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT)) {
|
||||||
|
Reference in New Issue
Block a user