From 7e53e72246c0d7f9fecbf2f186f2d7a2306c17ae Mon Sep 17 00:00:00 2001 From: Kiloku Date: Thu, 26 Dec 2024 20:57:55 -0300 Subject: [PATCH] Add Katina Friendly Fire Penalty tweak --- src/engine/fox_360.c | 3 +++ src/port/ui/ImguiUI.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 034b9bf0..67caa9a9 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -993,6 +993,9 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } + if (CVarGetInteger("gKatinaPunishFF", 0) == 1 && gHitCount > 0) { + gHitCount--; + } gKaAllyKillCount++; } switch (this->aiType) { diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 99dd148d..f240e50b 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -446,6 +446,10 @@ void DrawEnhancementsMenu() { .tooltip = "Character heads are displayed inside Arwings in all cutscenes", .defaultValue = true }); + UIWidgets::CVarCheckbox("Score penalty on Katina Friendly Fire", "gKatinaPunishFF", { + .tooltip = "Shooting down a friendly fighter on Katina reduces your score.", + .defaultValue = false + }); ImGui::EndMenu(); }