diff options
author | rubidium <rubidium@openttd.org> | 2009-01-10 14:30:01 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-10 14:30:01 +0000 |
commit | db546e607f72c70fb89fe05f5baa7b425bb92123 (patch) | |
tree | ef237d224d69edabc827ec3232e4d484491a57d9 /src/station_cmd.cpp | |
parent | 1b546505d29c69f1d25bfb3fe45fa2f617554b69 (diff) | |
download | openttd-db546e607f72c70fb89fe05f5baa7b425bb92123.tar.xz |
(svn r14956) -Fix [FS#1832]: building new station parts didn't allocate a new station spec effectively breaking variable 41. This was due to the limited number of station specs that we can have per station. This fix makes newly build station parts create a new spec until one cannot allocate new station specs anymore and it'll revert to the old behaviour (sharing station specs).
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index cfa23287d..ca641577b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1031,7 +1031,7 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, /* Check if we can allocate a custom stationspec to this station */ const StationSpec *statspec = GetCustomStationSpec((StationClassID)GB(p2, 0, 8), GB(p2, 8, 8)); int specindex = AllocateSpecToStation(statspec, st, flags & DC_EXEC); - if (specindex == -1) return CMD_ERROR; + if (specindex == -1) return_cmd_error(STR_TOO_MANY_STATION_SPECS); if (statspec != NULL) { /* Perform NewStation checks */ |