summaryrefslogtreecommitdiff
path: root/player_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-09-30 08:57:12 +0000
committertron <tron@openttd.org>2005-09-30 08:57:12 +0000
commitf6bda828064d40f8ac1233073537c94ba647aa8d (patch)
tree21fe28f93938856ac66808e61f4458c17121ba34 /player_gui.c
parentf8d1267d717f81d8c453edc7fb305344391f230e (diff)
downloadopenttd-f6bda828064d40f8ac1233073537c94ba647aa8d.tar.xz
(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
Diffstat (limited to 'player_gui.c')
-rw-r--r--player_gui.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/player_gui.c b/player_gui.c
index 5d9918dae..e9867d234 100644
--- a/player_gui.c
+++ b/player_gui.c
@@ -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;
}