From 8882406ff34664844a00690f059c4b1fe5f46696 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 12 Nov 2022 17:48:00 +0000 Subject: [PATCH] On second thoughts, restrict ANY profile application in dedicated - not just on initial startup - to the Guest profile --- src/k_profiles.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/k_profiles.c b/src/k_profiles.c index 5f50d189f..05cd60155 100644 --- a/src/k_profiles.c +++ b/src/k_profiles.c @@ -449,9 +449,10 @@ void PR_ApplyProfile(UINT8 profilenum, UINT8 playernum) profile_t *p = PR_GetProfile(profilenum); // this CAN happen!! - if (p == NULL) + if (dedicated || p == NULL) { - CONS_Printf("Profile '%d' could not be loaded as it does not exist. Guest Profile will be loaded instead.\n", profilenum); + if (!dedicated) + CONS_Printf("Profile '%d' could not be loaded as it does not exist. Guest Profile will be loaded instead.\n", profilenum); profilenum = 0; // make sure to set this so that the cvar is set properly. p = PR_GetProfile(profilenum); } @@ -481,9 +482,10 @@ void PR_ApplyProfilePretend(UINT8 profilenum, UINT8 playernum) profile_t *p = PR_GetProfile(profilenum); // this CAN happen!! - if (p == NULL) + if (dedicated || p == NULL) { - CONS_Printf("Profile '%d' could not be loaded as it does not exist. Guest Profile will be loaded instead.\n", profilenum); + if (!dedicated) + CONS_Printf("Profile '%d' could not be loaded as it does not exist. Guest Profile will be loaded instead.\n", profilenum); profilenum = 0; // make sure to set this so that the cvar is set properly. p = PR_GetProfile(profilenum); }