(svn r12811) [NoAI] -Fix (r12431): passengers subsidies are from towns to towns, not to industries
--- a/bin/ai/regression/regression.txt Fri Apr 18 23:33:51 2008 +0000
+++ b/bin/ai/regression/regression.txt Sun Apr 20 23:25:58 2008 +0000
@@ -6385,8 +6385,8 @@
EventName: SubsidyOffer
CargoID: 0
GetFromTownID: 6
- GetToTownID: 65535
+ GetToTownID: 15
GetFromIndustryID: 65535
- GetToIndustryID: 15
+ GetToIndustryID: 65535
IsEventWaiting: false
ERROR: We've got a suicidal AI for player 1
--- a/src/economy.cpp Fri Apr 18 23:33:51 2008 +0000
+++ b/src/economy.cpp Sun Apr 20 23:25:58 2008 +0000
@@ -1174,7 +1174,7 @@
pair = SetupSubsidyDecodeParam(s, 0);
AddNewsItem(STR_2030_SERVICE_SUBSIDY_OFFERED, NM_NORMAL, NF_TILE, NT_SUBSIDIES, DNC_NONE, pair.a, pair.b);
for (PlayerID i = PLAYER_FIRST; i != MAX_PLAYERS; i++) {
- AI_Event(i, new AIEventSubsidyOffer(s->cargo_type, s->cargo_type == CT_PASSENGERS, s->from, (GetCargo(s->cargo_type)->town_effect == TE_GOODS || GetCargo(s->cargo_type)->town_effect == TE_FOOD), s->to));
+ AI_Event(i, new AIEventSubsidyOffer(s->cargo_type, s->cargo_type == CT_PASSENGERS, s->from, (s->cargo_type == CT_PASSENGERS || GetCargo(s->cargo_type)->town_effect == TE_GOODS || GetCargo(s->cargo_type)->town_effect == TE_FOOD), s->to));
}
modified = true;
break;