(svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway

This commit is contained in:
tron
2005-09-30 08:57:12 +00:00
parent f8d1267d71
commit f6bda82806
2 changed files with 4 additions and 14 deletions

View File

@@ -634,9 +634,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
break;
case WE_PLACE_OBJ: {
/* You cannot destroy a HQ, only relocate it. So build_HQ is called, just with different flags */
TileIndex tile = GetPlayer(w->window_number)->location_of_house;
if (DoCommandP(e->place.tile, (tile == 0) ? 0 : 1 | w->window_number, 0, NULL, CMD_BUILD_COMPANY_HQ | CMD_AUTO | CMD_NO_WATER | CMD_MSG(STR_7071_CAN_T_BUILD_COMPANY_HEADQUARTERS)))
if (DoCommandP(e->place.tile, 0, 0, NULL, CMD_BUILD_COMPANY_HQ | CMD_AUTO | CMD_NO_WATER | CMD_MSG(STR_7071_CAN_T_BUILD_COMPANY_HEADQUARTERS)))
ResetObjectToPlace();
break;
}