(svn r18921) -Codechange: make the preconditions for Get/Set CustomStationSpecIndex a bit more strict

This commit is contained in:
yexo
2010-01-26 23:03:47 +00:00
parent c04cc6c2ab
commit 47527ca67a
3 changed files with 4 additions and 4 deletions

View File

@@ -1121,7 +1121,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
/* Remove animation if overbuilding */
DeleteAnimatedTile(tile);
byte old_specindex = IsTileType(tile, MP_STATION) ? GetCustomStationSpecIndex(tile) : 0;
byte old_specindex = HasStationTileRail(tile) ? GetCustomStationSpecIndex(tile) : 0;
MakeRailStation(tile, st->owner, st->index, axis, layout & ~1, rt);
/* Free the spec if we overbuild something */
DeallocateSpecFromStation(st, old_specindex);