summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-01-04 20:57:11 +0000
committerterkhen <terkhen@openttd.org>2011-01-04 20:57:11 +0000
commit2103f7e91a87bf090dd5c5e82fdad8e392b2df4a (patch)
tree1dea5eb73d3cb1be86cad8e659acf12f91d674b8 /src/company_cmd.cpp
parente4b8a4e3bf6208e59b27bae0bb431db98dbbf6f1 (diff)
downloadopenttd-2103f7e91a87bf090dd5c5e82fdad8e392b2df4a.tar.xz
(svn r21718) -Feature: Show a list of companies in the owner legend.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 3cec65c44..45d708c92 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -34,6 +34,7 @@
#include "vehicle_base.h"
#include "vehicle_func.h"
#include "sprite.h"
+#include "smallmap_gui.h"
#include "table/strings.h"
@@ -539,6 +540,8 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
SetWindowDirty(WC_GRAPH_LEGEND, 0);
SetWindowDirty(WC_TOOLBAR_MENU, 0);
SetWindowDirty(WC_CLIENT_LIST, 0);
+ BuildOwnerLegend();
+ InvalidateWindowData(WC_SMALLMAP, 0, 1);
if (is_ai && (!_networking || _network_server)) AI::StartNew(c->index);
@@ -890,6 +893,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
delete c;
AI::BroadcastNewEvent(new AIEventCompanyBankrupt(c_index));
CompanyAdminBankrupt(c_index);
+ BuildOwnerLegend();
+ InvalidateWindowData(WC_SMALLMAP, 0, 1);
break;
}