mirror of https://github.com/OpenTTD/OpenTTD.git
This commit is contained in:
parent
70d33dc71f
commit
93b711d70d
|
@ -328,6 +328,8 @@ CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, ObjectType type,
|
|||
case OBJECT_HQ: {
|
||||
Company *c = Company::Get(_current_company);
|
||||
if (c->location_of_HQ != INVALID_TILE) {
|
||||
/* Don't relocate HQ on the same location. */
|
||||
if (c->location_of_HQ == tile) return_cmd_error(STR_ERROR_ALREADY_BUILT);
|
||||
/* We need to persuade a bit harder to remove the old HQ. */
|
||||
_current_company = OWNER_WATER;
|
||||
cost.AddCost(ClearTile_Object(c->location_of_HQ, flags));
|
||||
|
|
Loading…
Reference in New Issue