diff -r 3b068c3a1c74 -r 0fa543611bbe src/ai/default/default.cpp --- a/src/ai/default/default.cpp Thu Apr 19 14:48:10 2007 +0000 +++ b/src/ai/default/default.cpp Tue Jun 12 11:56:35 2007 +0000 @@ -5,6 +5,7 @@ #include "../../aircraft.h" #include "../../bridge_map.h" #include "../../functions.h" +#include "../../landscape.h" #include "../../map.h" #include "../../rail_map.h" #include "../../road_map.h" @@ -1424,7 +1425,7 @@ if (t != NULL) { // Find a random oil rig industry in = AiFindRandomIndustry(); - if (in != NULL && in->type == IT_OIL_RIG) { + if (in != NULL && GetIndustrySpec(in->type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) { if (DistanceManhattan(t->xy, in->xy) < 60) break; } @@ -3822,7 +3823,7 @@ if (best_pl->player_money >> 1 >= p->bankrupt_value) { // Computer wants to buy it. PlayerID old_p = _current_player; - _current_player = p->index; + _current_player = best_pl->index; DoCommand(0, old_p, 0, DC_EXEC, CMD_BUY_COMPANY); _current_player = old_p; }