diff options
author | smatz <smatz@openttd.org> | 2011-01-21 00:11:13 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2011-01-21 00:11:13 +0000 |
commit | 1ac51128f5524023c124873b76c3c7d17830e8a7 (patch) | |
tree | 5d50c8621c1dcc3d64756e1cf3a61a1a6f50bc0c /src | |
parent | 698d840581bcd0145b8cc1d0d2eae92053f2e379 (diff) | |
download | openttd-1ac51128f5524023c124873b76c3c7d17830e8a7.tar.xz |
(svn r21874) -Fix: when a single-vehicle train was reversed while on a slope, its GOINGUP/DOWN weren't swapped
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index fe8f28b5d..0f77c2aa5 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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); } |