From 401eff9c6df33a5552f9431c04157f9a0fc26724 Mon Sep 17 00:00:00 2001 From: inspectredc Date: Fri, 6 Oct 2023 17:30:11 +0100 Subject: [PATCH] basic no exit implementation --- src/game/interaction.c | 2 +- src/port/ui/ImguiUI.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/interaction.c b/src/game/interaction.c index 776e0377..7badaf43 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -768,7 +768,7 @@ u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Ob u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { u32 starIndex; u32 starGrabAction = ACT_STAR_DANCE_EXIT; - u32 noExit = (o->oInteractionSubtype & INT_SUBTYPE_NO_EXIT) != 0; + u32 noExit = (o->oInteractionSubtype & INT_SUBTYPE_NO_EXIT) != 0 || CVarGetInteger("gStarNoExit", 0); u32 grandStar = (o->oInteractionSubtype & INT_SUBTYPE_GRAND_STAR) != 0; if (m->health >= 0x100) { diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 3935e75e..d6feeec3 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -270,6 +270,8 @@ void DrawEnhancementsMenu() { if (ImGui::BeginMenu("Gameplay")) { UIWidgets::PaddedEnhancementCheckbox("No Level of Detail (LOD)", "gDisableLOD", true, false); UIWidgets::Tooltip("Disable Level of Detail (LOD) to avoid models using lower poly versions at a distance"); + UIWidgets::PaddedEnhancementCheckbox("Collecting Stars Will Not Exit Level", "gStarNoExit", true, false); + UIWidgets::Tooltip("Stars act like the 100 coin star and will not take you out of the level"); ImGui::EndMenu(); }