mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Use correct type for unlock IDs in loading
This commit is contained in:
parent
1b3c63f24a
commit
49f644d5e9
2 changed files with 3 additions and 10 deletions
|
|
@ -483,15 +483,8 @@ void srb2::load_ng_gamedata()
|
|||
PU_STATIC, NULL));
|
||||
for (size_t i = 0; i < std::min((size_t)(gamedata->challengegridwidth * CHALLENGEGRIDHEIGHT), js.challengegrid.grid.size()); i++)
|
||||
{
|
||||
int16_t gridvalue = js.challengegrid.grid[i];
|
||||
if (gridvalue < 0)
|
||||
{
|
||||
gamedata->challengegrid[i] = MAXUNLOCKABLES;
|
||||
}
|
||||
else
|
||||
{
|
||||
gamedata->challengegrid[i] = static_cast<uint8_t>(gridvalue);
|
||||
}
|
||||
uint16_t gridvalue = js.challengegrid.grid[i];
|
||||
gamedata->challengegrid[i] = gridvalue;
|
||||
}
|
||||
|
||||
M_SanitiseChallengeGrid();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ struct GamedataPrisonEggPickupsJson final
|
|||
struct GamedataChallengeGridJson final
|
||||
{
|
||||
uint32_t width;
|
||||
std::vector<int16_t> grid;
|
||||
std::vector<uint16_t> grid;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(GamedataChallengeGridJson, width, grid)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue