diff options
author | frosch <frosch@openttd.org> | 2013-10-12 16:35:50 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-10-12 16:35:50 +0000 |
commit | 69a0c91d63df017f99137c4d70d69fa32d3822f9 (patch) | |
tree | 4c640ba170bc085cc70013259b62ce4447689463 /src/object_map.h | |
parent | 29f5eab56cac833ee0c4c6377c74c1c7f17174bf (diff) | |
download | openttd-69a0c91d63df017f99137c4d70d69fa32d3822f9.tar.xz |
(svn r25844) -Change: Increase maximum number of object instances on the map from 64k to about 16M.
Diffstat (limited to 'src/object_map.h')
-rw-r--r-- | src/object_map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object_map.h b/src/object_map.h index 3c185b14b..85faf4444 100644 --- a/src/object_map.h +++ b/src/object_map.h @@ -49,7 +49,7 @@ static inline bool IsObjectTypeTile(TileIndex t, ObjectType type) static inline ObjectID GetObjectIndex(TileIndex t) { assert(IsTileType(t, MP_OBJECT)); - return _m[t].m2; + return _m[t].m2 | _m[t].m5 << 16; } /** @@ -81,7 +81,7 @@ static inline void MakeObject(TileIndex t, Owner o, ObjectID index, WaterClass w _m[t].m2 = index; _m[t].m3 = random; _m[t].m4 = 0; - _m[t].m5 = 0; + _m[t].m5 = index >> 16; SB(_m[t].m6, 2, 4, 0); _me[t].m7 = 0; } |