Skip to content

Commit

Permalink
Fix OpenTTD#6742: Only possible to build station next to competitor b…
Browse files Browse the repository at this point in the history
…y using CTRL+click
  • Loading branch information
Joost Hopmans committed Jun 20, 2018
1 parent 470ed26 commit f279919
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/station_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,11 +674,7 @@ static CommandCost BuildStationPart(Station **st, DoCommandFlag flags, bool reus
/* Find a deleted station close to us */
if (*st == NULL && reuse) *st = GetClosestDeletedStation(area.tile);

if (*st != NULL) {
if ((*st)->owner != _current_company) {
return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION);
}

if (*st != NULL && (*st)->owner == _current_company) {
CommandCost ret = (*st)->rect.BeforeAddRect(area.tile, area.w, area.h, StationRect::ADD_TEST);
if (ret.Failed()) return ret;
} else {
Expand Down

1 comment on commit f279919

@SylvainDevidal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell me if I'm wrong, but I think the error message "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION" is now useless.
Or may be there are some other places where the bug perists.

Please sign in to comment.