Fix order destination refcount accounting for shared orders

This commit is contained in:
Jonathan G Rennison
2019-07-30 19:09:08 +01:00
parent 704eaf80f6
commit e28da50c4f

View File

@@ -63,6 +63,7 @@ void IntialiseOrderDestinationRefcountMap()
ClearOrderDestinationRefcountMap();
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v != v->FirstShared()) continue;
const Order *order;
FOR_VEHICLE_ORDERS(v, order) {
if (order->IsType(OT_GOTO_STATION) || order->IsType(OT_GOTO_WAYPOINT) || order->IsType(OT_IMPLICIT)) {