mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(svn r9530) -Codechange: Replace a direct industry type access by a behaviour
This commit is contained in:
parent
a764888619
commit
377fbf9eb7
@ -1424,7 +1424,7 @@ static void AiWantOilRigAircraftRoute(Player *p)
|
|||||||
if (t != NULL) {
|
if (t != NULL) {
|
||||||
// Find a random oil rig industry
|
// Find a random oil rig industry
|
||||||
in = AiFindRandomIndustry();
|
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)
|
if (DistanceManhattan(t->xy, in->xy) < 60)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user