--- a/src/unmovable_cmd.cpp Fri Sep 14 22:25:00 2007 +0000
+++ b/src/unmovable_cmd.cpp Fri Sep 14 22:27:40 2007 +0000
@@ -24,6 +24,7 @@
#include "table/unmovable_land.h"
#include "genworld.h"
#include "bridge.h"
+#include "autoslope.h"
/** Destroy a HQ.
* During normal gameplay you can only implicitely destroy a HQ when you are
@@ -408,6 +409,10 @@
/* Owned land remains unsold */
if (IsOwnedLand(tile) && CheckTileOwnership(tile)) return CommandCost();
+ if (AutoslopeEnabled() && (IsStatue(tile) || IsCompanyHQ(tile))) {
+ if (!IsSteepSlope(tileh_new) && (z_new + GetSlopeMaxZ(tileh_new) == GetTileMaxZ(tile))) return _price.terraform;
+ }
+
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
}