summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:59:36 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:59:36 +0000
commit77b7366c2947a3f2545d5542021be1cc203a74e8 (patch)
tree5fac077be3e90460822aa50987f903fb8f86a7aa /src/economy.cpp
parente7cd301d3c9990b4ef9f0748789bb5e0318c0d24 (diff)
downloadopenttd-77b7366c2947a3f2545d5542021be1cc203a74e8.tar.xz
(svn r23622) -Add: a set of events to trigger in a GameScript
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 5af0d787b..74f5552b8 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -47,6 +47,7 @@
#include "newgrf.h"
#include "core/backup_type.hpp"
#include "water.h"
+#include "game/game.hpp"
#include "table/strings.h"
#include "table/pricebase.h"
@@ -536,6 +537,7 @@ static void CompanyCheckBankrupt(Company *c)
SetDParamStr(2, cni->company_name);
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_TROUBLE, cni);
AI::BroadcastNewEvent(new ScriptEventCompanyInTrouble(c->index));
+ Game::NewEvent(new ScriptEventCompanyInTrouble(c->index));
break;
}
@@ -1644,6 +1646,7 @@ static void DoAcquireCompany(Company *c)
SetDParam(4, c->bankrupt_value);
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_MERGER, cni);
AI::BroadcastNewEvent(new ScriptEventCompanyMerger(ci, _current_company));
+ Game::NewEvent(new ScriptEventCompanyMerger(ci, _current_company));
ChangeOwnershipOfCompanyItems(ci, _current_company);