summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index d12b57743..aeda6f754 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -19,6 +19,7 @@
#include "company_base.h"
#include "company_gui.h"
#include "settings_type.h"
+#include "vehicle_base.h"
#include "table/strings.h"
@@ -118,6 +119,12 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
}
ResetVehicleColourMap();
MarkWholeScreenDirty();
+
+ /* Company colour data is indirectly cached. */
+ Vehicle *v;
+ FOR_ALL_VEHICLES(v) {
+ if (v->owner == _current_company) v->cache_valid = 0;
+ }
}
return CommandCost();
}