From be8b88fdf224e3399b368814537d207189f9ea2c Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sun, 22 Jun 2025 09:06:10 -0600 Subject: [PATCH] Fix special itemboxes providing Bananas instead (#310) * Update update_objects.h * Update update_objects.c * Update actors.c --- src/racing/actors.c | 4 ++-- src/update_objects.c | 4 ++-- src/update_objects.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/racing/actors.c b/src/racing/actors.c index 1dedf7f5a..e30f67e25 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -2222,7 +2222,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor actor->flags = -0x8000; actor->unk_04 = 0; if (player->type & PLAYER_HUMAN) { - func_8007ABFC(player - gPlayerOne, 7); + func_8007ABFC(player - gPlayerOne, ITEM_BLUE_SPINY_SHELL); } } else if (actor->state == 0) { actor->state = 1; @@ -2235,7 +2235,7 @@ void evaluate_collision_between_player_actor(Player* player, struct Actor* actor actor->flags = -0x8000; actor->unk_04 = 0; if (player->type & PLAYER_HUMAN) { - func_8007ABFC(player - gPlayerOne, 0); + func_8007ABFC(player - gPlayerOne, ITEM_NONE); } } else if (actor->state == 0) { actor->state = 1; diff --git a/src/update_objects.c b/src/update_objects.c index 12a7d69ed..729af088c 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -2610,14 +2610,14 @@ void func_80078C70(s32 arg0) { } } -void func_8007ABFC(s32 playerId, bool arg1) { +void func_8007ABFC(s32 playerId, s32 arg1) { s32 itemWindow; if (playerHUD[playerId].raceCompleteBool == false) { itemWindow = gItemWindowObjectByPlayerId[playerId]; if (func_80072354(itemWindow, 4) != 0) { init_object(itemWindow, 0); - if (arg1 != 0) { + if (arg1 != ITEM_NONE) { playerHUD[playerId].itemOverride = arg1; } } diff --git a/src/update_objects.h b/src/update_objects.h index 421ba26b4..ed5e190c8 100644 --- a/src/update_objects.h +++ b/src/update_objects.h @@ -196,7 +196,7 @@ void func_8007A88C(s32); void func_8007A910(s32); void update_object_lakitu(s32); void func_8007AA44(s32); -void func_8007ABFC(s32, bool); +void func_8007ABFC(s32, s32); void consume_item(s32); u8 gen_random_item(s16, s16); u8 gen_random_item_human(s16, s16);