TBTR: Do not allocate virtual trains a unit number in NormaliseTrainHead
This commit is contained in:
@@ -1361,7 +1361,7 @@ static void NormaliseTrainHead(Train *head)
|
|||||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, WID_VV_REFIT);
|
SetWindowWidgetDirty(WC_VEHICLE_VIEW, head->index, WID_VV_REFIT);
|
||||||
|
|
||||||
/* If we don't have a unit number yet, set one. */
|
/* 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);
|
head->unitnumber = GetFreeUnitNumber(VEH_TRAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user