summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 3b5ff715a..ba4a96cce 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1145,9 +1145,10 @@ void StateGameLoop()
} break;
case VEH_AIRCRAFT: {
- uint speed = v->u.air.cached_max_speed;
- UpdateAircraftCache(v);
- if (speed != v->u.air.cached_max_speed) {
+ Aircraft *a = (Aircraft *)v;
+ uint speed = a->u.air.cached_max_speed;
+ UpdateAircraftCache(a);
+ if (speed != a->u.air.cached_max_speed) {
DEBUG(desync, 2, "cache mismatch: vehicle %i, company %i, unit number %i\n", v->index, (int)v->owner, v->unitnumber);
}
} break;