diff --git a/src/newgrf.cpp b/src/newgrf.cpp index dface701cc..ab725bc9fa 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6529,7 +6529,7 @@ static void ObjectMapSpriteGroup(ByteReader *buf, uint8 idcount) uint16 *objects = AllocaM(uint16, idcount); for (uint i = 0; i < idcount; i++) { - objects[i] = buf->ReadExtendedByte(); + objects[i] = HasBit(_cur.grffile->observed_feature_tests, GFTOF_MORE_OBJECTS_PER_GRF) ? buf->ReadExtendedByte() : buf->ReadByte(); } uint8 cidcount = buf->ReadByte(); diff --git a/src/newgrf_extension.cpp b/src/newgrf_extension.cpp index 3e9c557f92..8e3e7edf92 100644 --- a/src/newgrf_extension.cpp +++ b/src/newgrf_extension.cpp @@ -57,7 +57,7 @@ extern const GRFFeatureInfo _grf_feature_list[] = { GRFFeatureInfo("action0_object_viewport_map_tile_type", 1), GRFFeatureInfo("road_stops", 7), GRFFeatureInfo("new_landscape", 2), - GRFFeatureInfo("more_objects_per_grf", 1), + GRFFeatureInfo("more_objects_per_grf", 1, GFTOF_MORE_OBJECTS_PER_GRF), GRFFeatureInfo(), }; diff --git a/src/newgrf_extension.h b/src/newgrf_extension.h index 6c1fade0fe..dd1e6c2184 100644 --- a/src/newgrf_extension.h +++ b/src/newgrf_extension.h @@ -86,6 +86,8 @@ enum Action2VariableRemapIds { }; enum GRFFeatureTestObservationFlag : uint8 { + GFTOF_MORE_OBJECTS_PER_GRF = 0, + GFTOF_INVALID = 0xFF, };