From 1e769573e65ef3980ee3698d38e3c6e2e754088f Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 11 Jun 2023 14:25:28 -0700 Subject: [PATCH] Cleanup --- src/engine/behavior_script.c | 8 +++----- src/game/interaction.c | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index bc07003b..8044ce2b 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -1415,15 +1415,13 @@ cur_obj_update_begin:; // Out of render distance, hide the object. gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; - if (gBehaviorValues.InfiniteRenderDistance) - { + if (gBehaviorValues.InfiniteRenderDistance) { gCurrentObject->activeFlags &= ~ACTIVE_FLAG_FAR_AWAY; - } - else - { + } else { // the following flag would deactivate behavior code // sorry but I need this gCurrentObject->activeFlags |= ACTIVE_FLAG_FAR_AWAY; } + } else if (gCurrentObject->oHeldState == HELD_FREE) { // In render distance (and not being held), show the object. gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; diff --git a/src/game/interaction.c b/src/game/interaction.c index 4c30fc1f..2662c106 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1940,9 +1940,8 @@ u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct O return FALSE; } - for (s32 i = 0; i < MAX_PLAYERS; i++) { + for (s32 i = 1; i < MAX_PLAYERS; i++) { if (!is_player_active(&gMarioStates[i])) { continue; } - if (i == 0) { continue; } if (gMarioStates[i].riddenObj == o) { return FALSE; } }