(svn r21874) -Fix: when a single-vehicle train was reversed while on a slope, its GOINGUP/DOWN weren't swapped

This commit is contained in:
smatz 2011-01-21 00:11:13 +00:00
parent 698d840581
commit 1ac51128f5
1 changed files with 4 additions and 0 deletions

View File

@ -1487,6 +1487,10 @@ static void ReverseTrainSwapVeh(Train *v, int l, int r)
UpdateStatusAfterSwap(a);
UpdateStatusAfterSwap(b);
} else {
/* Swap GVF_GOINGUP_BIT/GVF_GOINGDOWN_BIT.
* This is a little bit redundant way, a->gv_flags will
* be (re)set twice, but it reduces code duplication */
SwapTrainFlags(&a->gv_flags, &a->gv_flags);
UpdateStatusAfterSwap(a);
}