Use constant for max ride categories

This commit is contained in:
Ted John 2018-05-15 12:08:20 +01:00
parent 6f00e6aafe
commit 58241d33fc
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ protected:
switch (object_entry_get_type(&item.ObjectEntry)) {
case OBJECT_TYPE_RIDE:
item.RideInfo.RideFlags = stream->ReadValue<uint8>();
for (sint32 i = 0; i < 2; i++)
for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++)
{
item.RideInfo.RideCategory[i] = stream->ReadValue<uint8>();
}

View File

@ -46,7 +46,7 @@ struct ObjectRepositoryItem
struct
{
uint8 RideFlags;
uint8 RideCategory[2];
uint8 RideCategory[MAX_CATEGORIES_PER_RIDE];
uint8 RideType[MAX_RIDE_TYPES_PER_RIDE_ENTRY];
uint8 RideGroupIndex;
} RideInfo;