summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike <ipodappsrcool@gmail.com>2021-03-30 13:42:12 -0400
committerGitHub <noreply@github.com>2021-03-30 19:42:12 +0200
commit49c89cb5f6bbe459c9b7af3268e167d70d513722 (patch)
tree68b246e357b1b37d97cadebc8ffc28dda88e32e1 /src
parente23ccc95f5905e43b2ec0a2c3408ec881abf94f9 (diff)
downloadopenttd-49c89cb5f6bbe459c9b7af3268e167d70d513722.tar.xz
Fix #8565: Stopped road vehicle displays a speed different than 0 (#8901)
Diffstat (limited to 'src')
-rw-r--r--src/roadveh_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index f707f1221..1a4e4e085 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1571,7 +1571,10 @@ static bool RoadVehController(RoadVehicle *v)
/* road vehicle has broken down? */
if (v->HandleBreakdown()) return true;
- if (v->vehstatus & VS_STOPPED) return true;
+ if (v->vehstatus & VS_STOPPED) {
+ v->SetLastSpeed();
+ return true;
+ }
ProcessOrders(v);
v->HandleLoading();