From 77b7366c2947a3f2545d5542021be1cc203a74e8 Mon Sep 17 00:00:00 2001 From: truebrain Date: Mon, 19 Dec 2011 20:59:36 +0000 Subject: (svn r23622) -Add: a set of events to trigger in a GameScript --- src/company_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/company_cmd.cpp') diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 5cd965038..d4627078f 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -35,6 +35,7 @@ #include "vehicle_func.h" #include "sprite.h" #include "smallmap_gui.h" +#include "game/game.hpp" #include "table/strings.h" @@ -563,6 +564,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY) if (is_ai && (!_networking || _network_server)) AI::StartNew(c->index); AI::BroadcastNewEvent(new ScriptEventCompanyNew(c->index), c->index); + Game::NewEvent(new ScriptEventCompanyNew(c->index)); return c; } @@ -905,6 +907,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 CompanyID c_index = c->index; delete c; AI::BroadcastNewEvent(new ScriptEventCompanyBankrupt(c_index)); + Game::NewEvent(new ScriptEventCompanyBankrupt(c_index)); CompanyAdminRemove(c_index, (CompanyRemoveReason)reason); break; } -- cgit v1.2.3-54-g00ecf