TBTR: Do not allocate virtual trains a unit number in NormaliseTrainHead

(cherry picked from commit 8fefef9d19)
pull/104/head
Jonathan G Rennison 5 years ago
parent ccfd187677
commit 2b40007ca1

@ -1161,7 +1161,7 @@ static void NormaliseTrainHead(Train *head)
SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, WID_VV_REFIT);
/* If we don't have a unit number yet, set one. */
if (head->unitnumber != 0) return;
if (head->unitnumber != 0 || HasBit(head->subtype, GVSF_VIRTUAL)) return;
head->unitnumber = GetFreeUnitNumber(VEH_TRAIN);
}

Loading…
Cancel
Save