equal
deleted
inserted
replaced
632 if ((++w->vscroll.pos & 0x1F) == 0) |
632 if ((++w->vscroll.pos & 0x1F) == 0) |
633 SetWindowDirty(w); |
633 SetWindowDirty(w); |
634 break; |
634 break; |
635 |
635 |
636 case WE_PLACE_OBJ: { |
636 case WE_PLACE_OBJ: { |
637 /* You cannot destroy a HQ, only relocate it. So build_HQ is called, just with different flags */ |
637 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))) |
638 TileIndex tile = GetPlayer(w->window_number)->location_of_house; |
|
639 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))) |
|
640 ResetObjectToPlace(); |
638 ResetObjectToPlace(); |
641 break; |
639 break; |
642 } |
640 } |
643 |
641 |
644 |
642 |