--- a/unmovable_cmd.c Thu Sep 29 20:20:34 2005 +0000
+++ b/unmovable_cmd.c Fri Sep 30 08:57:12 2005 +0000
@@ -60,7 +60,7 @@
/** Build or relocate the HQ. This depends if the HQ is already built or not
* @param x,y the coordinates where the HQ will be built or relocated to
- * @param p1 relocate HQ (set to some value, usually 1 or true)
+ * @param p1 unused
* @param p2 unused
*/
extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, int *);
@@ -75,18 +75,10 @@
cost = CheckFlatLandBelow(tile, 2, 2, flags, 0, NULL);
if (CmdFailed(cost)) return CMD_ERROR;
- if (p1) { /* Moving HQ */
- int32 ret;
-
- if (p->location_of_house == 0) return CMD_ERROR;
-
- ret = DestroyCompanyHQ(p->location_of_house, flags);
-
+ if (p->location_of_house != 0) { /* Moving HQ */
+ int32 ret = DestroyCompanyHQ(p->location_of_house, flags);
if (CmdFailed(ret)) return CMD_ERROR;
-
cost += ret;
- } else { /* Building new HQ */
- if (p->location_of_house != 0) return CMD_ERROR;
}
if (flags & DC_EXEC) {