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

This commit is contained in:
Jonathan G Rennison
2019-07-03 02:48:24 +01:00
parent 1df56993ea
commit 8fefef9d19

View File

@@ -1361,7 +1361,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);
}