GRF: Only use extended bytes for object IDs if feature is tested for

This commit is contained in:
Jonathan G Rennison
2023-02-12 21:56:08 +00:00
parent a85b3d7de7
commit 64699d94c9
3 changed files with 4 additions and 2 deletions

View File

@@ -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();