From 2a430d981f680485b9d4f9e5fab8bc642952b9bf Mon Sep 17 00:00:00 2001 From: smatz Date: Sat, 8 Aug 2009 16:42:55 +0000 Subject: (svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source -Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost -Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies --- src/town_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/town_cmd.cpp') diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index bb16c11e1..b4249a1f8 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -99,7 +99,7 @@ Town::~Town() } DeleteSubsidyWith(ST_TOWN, this->index); - + CargoPacket::InvalidateAllFrom(ST_TOWN, this->index); MarkWholeScreenDirty(); } @@ -460,7 +460,7 @@ static void TileLoop_Town(TileIndex tile) uint amt = GB(callback, 0, 8); if (amt == 0) continue; - uint moved = MoveGoodsToStation(tile, 1, 1, cargo, amt); + uint moved = MoveGoodsToStation(tile, 1, 1, cargo, amt, ST_TOWN, t->index); const CargoSpec *cs = CargoSpec::Get(cargo); switch (cs->town_effect) { @@ -484,7 +484,7 @@ static void TileLoop_Town(TileIndex tile) if (_economy.fluct <= 0) amt = (amt + 1) >> 1; t->new_max_pass += amt; - t->new_act_pass += MoveGoodsToStation(tile, 1, 1, CT_PASSENGERS, amt); + t->new_act_pass += MoveGoodsToStation(tile, 1, 1, CT_PASSENGERS, amt, ST_TOWN, t->index); } if (GB(r, 8, 8) < hs->mail_generation) { @@ -492,7 +492,7 @@ static void TileLoop_Town(TileIndex tile) if (_economy.fluct <= 0) amt = (amt + 1) >> 1; t->new_max_mail += amt; - t->new_act_mail += MoveGoodsToStation(tile, 1, 1, CT_MAIL, amt); + t->new_act_mail += MoveGoodsToStation(tile, 1, 1, CT_MAIL, amt, ST_TOWN, t->index); } } -- cgit v1.2.3-54-g00ecf