diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 679efbb188..dd5f70bf2f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1635,8 +1635,10 @@ static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2) /* Clear the flags */ ClrBit(*swap_flag1, GVF_GOINGUP_BIT); ClrBit(*swap_flag1, GVF_GOINGDOWN_BIT); + ClrBit(*swap_flag1, GVF_CHUNNEL_BIT); ClrBit(*swap_flag2, GVF_GOINGUP_BIT); ClrBit(*swap_flag2, GVF_GOINGDOWN_BIT); + ClrBit(*swap_flag2, GVF_CHUNNEL_BIT); /* Reverse the rail-flags (if needed) */ if (HasBit(flag1, GVF_GOINGUP_BIT)) { @@ -1649,6 +1651,12 @@ static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2) } else if (HasBit(flag2, GVF_GOINGDOWN_BIT)) { SetBit(*swap_flag1, GVF_GOINGUP_BIT); } + if (HasBit(flag1, GVF_CHUNNEL_BIT)) { + SetBit(*swap_flag2, GVF_CHUNNEL_BIT); + } + if (HasBit(flag2, GVF_CHUNNEL_BIT)) { + SetBit(*swap_flag1, GVF_CHUNNEL_BIT); + } } /**