From 6ae9cf948214665c4dea801ef9ec6e286543bc90 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sat, 1 Aug 2026 14:41:03 -0600 Subject: [PATCH] Add notes from a couple bugs (#778) * Update render_player.c * Document broken shell firing condition in actors_extended.c Add comment explaining broken shell firing condition. --- src/racing/actors_extended.c | 6 ++++++ src/render_player.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/racing/actors_extended.c b/src/racing/actors_extended.c index db63f7dfa..cca7f1708 100644 --- a/src/racing/actors_extended.c +++ b/src/racing/actors_extended.c @@ -427,6 +427,12 @@ void update_actor_triple_shell(TripleShellParent* parent, s16 shellType) { if (parent->unk_08 > 0.0f) { if (parent->shellIndices[0] > 0.0f) { shell = (struct ShellActor*) &gActorList[(s16) parent->shellIndices[0]]; + /** + * This condition is broken and always evaluates to true. + * If you fix the condition, when you fire a shell it continues being held by the player + * until the shell is in-front of the player. This allows the shell to always shoot in a foward direction instead of straying sideways. + * when fired at the wrong time + */ if ((shell->rotAngle < DEGREES(5)) || (shell->rotAngle > -DEGREES(5))) { someVelocity[0] = 0; someVelocity[1] = 0; diff --git a/src/render_player.c b/src/render_player.c index 52a32430d..37bba28d8 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -1155,6 +1155,8 @@ void render_light_environment_on_player(Player* player, s8 playerIndex) { ((gNearestPathPointByPlayerId[playerIndex] >= 0x216) && (gNearestPathPointByPlayerId[playerIndex] < 0x21D)) || ((gNearestPathPointByPlayerId[playerIndex] >= 0x230) && (gNearestPathPointByPlayerId[playerIndex] < 0x23A)) || ((gNearestPathPointByPlayerId[playerIndex] >= 0x24C) && (gNearestPathPointByPlayerId[playerIndex] < 0x256)) || + // This is the second last lamp. This condition is bugged and it does not glow on the player. + // The value 0x228 was probably meant to be 0x25F. ((gNearestPathPointByPlayerId[playerIndex] >= 0x288) && (gNearestPathPointByPlayerId[playerIndex] < 0x269)) || ((gNearestPathPointByPlayerId[playerIndex] >= 0x274) && (gNearestPathPointByPlayerId[playerIndex] < 0x27E))) { // under a lamp