summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
committersmatz <smatz@openttd.org>2009-06-24 17:39:54 +0000
commit8343340acb5bdb40555e04f40aac567d6e583bb8 (patch)
tree29b17ad863977abd3d3417dd8bbf84e01cfc261d /src/water_cmd.cpp
parentb18bf87c9081c3d202897e9c3ed282729db415a4 (diff)
downloadopenttd-8343340acb5bdb40555e04f40aac567d6e583bb8.tar.xz
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 17aadffce..44e5b710c 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -32,6 +32,7 @@
#include "newgrf_cargo.h"
#include "effectvehicle_func.h"
#include "tunnelbridge_map.h"
+#include "station_base.h"
#include "ai/ai.hpp"
#include "table/sprites.h"
@@ -740,7 +741,7 @@ static void FloodVehicles(TileIndex tile)
byte z = 0;
if (IsTileType(tile, MP_STATION) && IsAirport(tile)) {
- const Station *st = GetStationByTile(tile);
+ const Station *st = Station::GetByTile(tile);
const AirportFTAClass *airport = st->Airport();
z = 1 + airport->delta_z;
for (uint x = 0; x < airport->size_x; x++) {
@@ -756,7 +757,7 @@ static void FloodVehicles(TileIndex tile)
/* if non-uniform stations are disabled, flood some train in this train station (if there is any) */
if (!_settings_game.station.nonuniform_stations && IsTileType(tile, MP_STATION) && GetStationType(tile) == STATION_RAIL) {
- const Station *st = GetStationByTile(tile);
+ const Station *st = Station::GetByTile(tile);
BEGIN_TILE_LOOP(t, st->trainst_w, st->trainst_h, st->train_tile)
if (st->TileBelongsToRailStation(t)) {
@@ -790,7 +791,7 @@ static void FloodVehicle(Vehicle *v)
* because that's always the shadow. Except for the heliport, because
* that station has a big z_offset for the aircraft. */
if (!IsTileType(v->tile, MP_STATION) || !IsAirport(v->tile) || GetTileMaxZ(v->tile) != 0) return;
- const Station *st = GetStationByTile(v->tile);
+ const Station *st = Station::GetByTile(v->tile);
const AirportFTAClass *airport = st->Airport();
if (v->z_pos != airport->delta_z + 1) return;