diff options
author | frosch <frosch@openttd.org> | 2021-10-22 21:46:55 +0200 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2021-10-23 14:45:08 +0200 |
commit | bc984d9af52eaf55b7b76ad9e3cc5115935803b0 (patch) | |
tree | 85f5565f2bba561a0270483f8b89a779670d3f6e /src/newgrf_engine.cpp | |
parent | bf0210229c9e9a9c36c515e5a19bd620bc22c924 (diff) | |
download | openttd-bc984d9af52eaf55b7b76ad9e3cc5115935803b0.tar.xz |
Codechange: remove redundant 'info_view' parameter, it can be derived from 'image_type'.
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r-- | src/newgrf_engine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index ee4af5e6a..128f5639c 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -1103,7 +1103,7 @@ void GetCustomEngineSprite(EngineID engine, const Vehicle *v, Direction directio } -void GetRotorOverrideSprite(EngineID engine, const struct Aircraft *v, bool info_view, EngineImageType image_type, VehicleSpriteSeq *result) +void GetRotorOverrideSprite(EngineID engine, const struct Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result) { const Engine *e = Engine::Get(engine); @@ -1111,6 +1111,7 @@ void GetRotorOverrideSprite(EngineID engine, const struct Aircraft *v, bool info assert(e->type == VEH_AIRCRAFT); assert(!(e->u.air.subtype & AIR_CTOL)); + bool info_view = image_type != EIT_ON_MAP; VehicleResolverObject object(engine, v, VehicleResolverObject::WO_SELF, info_view, CBID_NO_CALLBACK); result->Clear(); uint rotor_pos = v == nullptr || info_view ? 0 : v->Next()->Next()->state; |