Add routing restriction action to make exempt from speed adaptation

This commit is contained in:
Jonathan G Rennison
2022-03-06 21:28:38 +00:00
parent 60a33feac8
commit 92142e5684
11 changed files with 131 additions and 6 deletions

View File

@@ -429,6 +429,7 @@ CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head, DoComma
if (old_head->type == VEH_TRAIN) {
Train::From(new_head)->speed_restriction = Train::From(old_head)->speed_restriction;
SB(Train::From(new_head)->flags, VRF_SPEED_ADAPTATION_EXEMPT, 1, GB(Train::From(old_head)->flags, VRF_SPEED_ADAPTATION_EXEMPT, 1));
}
/* Transfer any acquired trace restrict slots to the new vehicle */