diff options
author | yexo <yexo@openttd.org> | 2010-01-18 12:36:08 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-01-18 12:36:08 +0000 |
commit | bcec00fdbd97f2d9efb218084bbfe3ec16be920e (patch) | |
tree | 700476e538895b4fa18d14a8315754e05ce6fa14 /src/disaster_cmd.cpp | |
parent | ab68f08886743fd32ac52bdc666cbf2da9b53287 (diff) | |
download | openttd-bcec00fdbd97f2d9efb218084bbfe3ec16be920e.tar.xz |
(svn r18858) -Codechange: use IsAirportTile where possible
Diffstat (limited to 'src/disaster_cmd.cpp')
-rw-r--r-- | src/disaster_cmd.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 873a6f421..142ec01d7 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -209,9 +209,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v) if (GB(v->tick_counter, 0, 3) == 0) CreateEffectVehicleRel(v, 0, -17, 2, EV_SMOKE); } else if (v->current_order.GetDestination() == 0) { - if (IsValidTile(v->tile) && - IsTileType(v->tile, MP_STATION) && - IsAirport(v->tile)) { + if (IsValidTile(v->tile) && IsAirportTile(v->tile)) { v->current_order.SetDestination(1); v->age = 0; @@ -234,9 +232,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v) if (v->current_order.GetDestination() > 2) { if (++v->age <= 13320) return true; - if (IsValidTile(v->tile) && - IsTileType(v->tile, MP_STATION) && - IsAirport(v->tile)) { + if (IsValidTile(v->tile) && IsAirportTile(v->tile)) { Station *st = Station::GetByTile(v->tile); CLRBITS(st->airport_flags, RUNWAY_IN_block); AI::NewEvent(GetTileOwner(v->tile), new AIEventDisasterZeppelinerCleared(st->index)); @@ -274,9 +270,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v) v->age = 0; } - if (IsValidTile(v->tile) && - IsTileType(v->tile, MP_STATION) && - IsAirport(v->tile)) { + if (IsValidTile(v->tile) && IsAirportTile(v->tile)) { SETBITS(Station::GetByTile(v->tile)->airport_flags, RUNWAY_IN_block); } |