mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
Chunnel: Fix swap of vehicle chunnel flag when reversing consist.
This commit is contained in:
parent
612c825bb6
commit
c882082467
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user