(svn r14171) -Codechange: Make the test for HQ a bit lighter.
authorbelugas
Mon, 25 Aug 2008 16:41:00 +0000
changeset 10012 c773e1c2c03b
parent 10011 eeec680fed23
child 10013 cf6837425ca9
(svn r14171) -Codechange: Make the test for HQ a bit lighter.
The presence of a HQ is only dictated by the 7th bit been set.
The rest of the data is related to the size and the type.
src/unmovable_map.h
--- a/src/unmovable_map.h	Mon Aug 25 16:20:26 2008 +0000
+++ b/src/unmovable_map.h	Mon Aug 25 16:41:00 2008 +0000
@@ -83,7 +83,7 @@
 static inline bool IsCompanyHQ(TileIndex t)
 {
 	assert(IsTileType(t, MP_UNMOVABLE));
-	return IsInsideMM(GetUnmovableType(t), UNMOVABLE_HQ_NORTH, UNMOVABLE_HQ_END);
+	return HasBit(_m[t].m5, 7);
 }
 
 /**