Skip to content

Commit

Permalink
Merge pull request #2039 from Scyrous/patch-1
Browse files Browse the repository at this point in the history
Bugfix for cable car hikerGraphicsIds array
  • Loading branch information
GriffinRichards authored Oct 2, 2024
2 parents 473e062 + 1dc85df commit 37d104f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cable_car.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,12 @@ static void CreateCableCarSprites(void)
// 1/64 chance for an NPC to appear hiking on the ground below the Cable Car
if ((rval % 64) == 0)
{
// Unclear if this was intentional, but the - 1 in the below ARRAY_COUNT means the Zigzagoon is never used
// BUGFIX: The - 1 in the below ARRAY_COUNT means the Zigzagoon is never used
#ifdef BUGFIX
spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % ARRAY_COUNT(hikerGraphicsIds)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106);
#else
spriteId = CreateObjectGraphicsSprite(hikerGraphicsIds[rval % (ARRAY_COUNT(hikerGraphicsIds) - 1)], hikerCallbacks[GOING_DOWN], hikerCoords[GOING_DOWN][0], hikerCoords[GOING_DOWN][1], 106);
#endif
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].oam.priority = 2;
Expand Down

0 comments on commit 37d104f

Please sign in to comment.