(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).

This commit is contained in:
rubidium
2009-01-10 14:30:01 +00:00
parent 1b546505d2
commit db546e607f
3 changed files with 14 additions and 7 deletions

View File

@@ -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 */