diff options
author | rubidium <rubidium@openttd.org> | 2010-08-07 22:07:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-07 22:07:07 +0000 |
commit | edbadde301d04264110b1b923ba80af367f6651c (patch) | |
tree | e9f8998e89b9811d9bc0febd58272339a63951c9 /src/waypoint_cmd.cpp | |
parent | cb4ab6a23158163e848ab2b5887d1eb449b86a4c (diff) | |
download | openttd-edbadde301d04264110b1b923ba80af367f6651c.tar.xz |
(svn r20406) -Codechange: make StationClass use the new generic class
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 2d832c924..4d2520c25 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -169,7 +169,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint /* Check if the given station class is valid */ if (spec_class != STAT_CLASS_WAYP) return CMD_ERROR; - if (spec_index >= GetNumCustomStations(spec_class)) return CMD_ERROR; + if (spec_index >= StationClass::GetCount(spec_class)) return CMD_ERROR; /* The number of parts to build */ byte count = axis == AXIS_X ? height : width; @@ -241,7 +241,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint wp->UpdateVirtCoord(); - const StationSpec *spec = GetCustomStationSpec(spec_class, spec_index); + const StationSpec *spec = StationClass::Get(spec_class, spec_index); byte *layout_ptr = AllocaM(byte, count); if (spec == NULL) { /* The layout must be 0 for the 'normal' waypoints by design. */ |