From 69a0c91d63df017f99137c4d70d69fa32d3822f9 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 12 Oct 2013 16:35:50 +0000 Subject: (svn r25844) -Change: Increase maximum number of object instances on the map from 64k to about 16M. --- src/saveload/afterload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 5f56b0a08..96b568b82 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2819,9 +2819,9 @@ bool AfterLoadGame() /* Move ObjectType from map to pool */ for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_OBJECT)) { - Object *o = Object::GetByTile(t); + Object *o = Object::Get(_m[t].m2); o->type = _m[t].m5; - _m[t].m5 = 0; // cleanup for next usage + _m[t].m5 = 0; // zero upper bits of (now bigger) ObjectID } } } -- cgit v1.2.3-70-g09d2