From d97db8f2302b58cef877e413c741393c3e2dc069 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 18 Aug 2024 19:40:58 +0100 Subject: [PATCH] Do not reapply P1's Profile in full in edit menu flow Prevents changing player skin/color cvar when backing out (resolves KartKrew/RingRacers#34) --- src/menus/options-profiles-edit-1.c | 9 ++------- src/menus/options-profiles-edit-controls.c | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/menus/options-profiles-edit-1.c b/src/menus/options-profiles-edit-1.c index 93d44049a..234a0efda 100644 --- a/src/menus/options-profiles-edit-1.c +++ b/src/menus/options-profiles-edit-1.c @@ -115,15 +115,10 @@ static void M_ProfileEditApply(void) CV_SetValue(&cv_fov[belongsto], cv_dummyprofilefov.value); } - // Reapply player 1's real profile. - // (And then we do this for P1 anyway. I didn't write - // this code so I'm not sure why it's doing this, but it - // can override cv_skin if forcecharacter is in effect! - // I suspect this is intended to set cv_currprofile. - // FIXME?) + // Reapply player 1's real profile ID. if (cv_currprofile.value > -1) { - PR_ApplyProfile(cv_lastprofile[0].value, 0); + PR_ApplyProfilePretend(cv_lastprofile[0].value, 0); } } diff --git a/src/menus/options-profiles-edit-controls.c b/src/menus/options-profiles-edit-controls.c index 3be0e117d..2c5dcec9e 100644 --- a/src/menus/options-profiles-edit-controls.c +++ b/src/menus/options-profiles-edit-controls.c @@ -278,10 +278,10 @@ void M_ProfileControlsConfirm(INT32 choice) M_ProfileControlSaveResponse(MA_YES); - // Reapply player 1's real profile. + // Reapply player 1's real profile ID. if (cv_currprofile.value > -1) { - PR_ApplyProfile(cv_lastprofile[0].value, 0); + PR_ApplyProfilePretend(cv_lastprofile[0].value, 0); } }