summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-05-01 13:24:37 +0000
committerDarkvater <darkvater@openttd.org>2006-05-01 13:24:37 +0000
commit9482534f5e4e340f0732ad7ae54e86b4ed658981 (patch)
tree00962c5fc0c96e1fd8915f0f13ae27d2676d4536
parentf4dcf22f2c3f90e4fc4eea07e776f634e492641f (diff)
downloadopenttd-9482534f5e4e340f0732ad7ae54e86b4ed658981.tar.xz
(svn r4648) - Fix (r4196): Company HQ's were not upgraded during the monthly loops.
-rw-r--r--unmovable_map.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/unmovable_map.h b/unmovable_map.h
index d8ee49a0b..c34e6c590 100644
--- a/unmovable_map.h
+++ b/unmovable_map.h
@@ -66,12 +66,13 @@ static inline byte GetCompanyHQSection(TileIndex t)
static inline void EnlargeCompanyHQ(TileIndex t, byte size)
{
+ size *= 4;
if (size <= _m[t].m5 - UNMOVABLE_HQ_NORTH) return;
- _m[t + TileDiffXY(0, 0)].m5 = UNMOVABLE_HQ_NORTH + size * 4;
- _m[t + TileDiffXY(0, 1)].m5 = UNMOVABLE_HQ_WEST + size * 4;
- _m[t + TileDiffXY(1, 0)].m5 = UNMOVABLE_HQ_EAST + size * 4;
- _m[t + TileDiffXY(1, 1)].m5 = UNMOVABLE_HQ_SOUTH + size * 4;
+ _m[t + TileDiffXY(0, 0)].m5 = UNMOVABLE_HQ_NORTH + size;
+ _m[t + TileDiffXY(0, 1)].m5 = UNMOVABLE_HQ_WEST + size;
+ _m[t + TileDiffXY(1, 0)].m5 = UNMOVABLE_HQ_EAST + size;
+ _m[t + TileDiffXY(1, 1)].m5 = UNMOVABLE_HQ_SOUTH + size;
}