diff --git a/src/k_profiles.c b/src/k_profiles.c index 4bddd04ad..482f748f3 100644 --- a/src/k_profiles.c +++ b/src/k_profiles.c @@ -24,7 +24,13 @@ INT32 PR_GetNumProfiles(void) return numprofiles; } -profile_t* PR_MakeProfile(const char *prname, const char *pname, const char *sname, const UINT16 col, const char *fname, UINT16 fcol, INT32 controlarray[num_gamecontrols][MAXINPUTMAPPING]) +profile_t* PR_MakeProfile( + const char *prname, + const char *pname, + const char *sname, const UINT16 col, + const char *fname, const UINT16 fcol, + INT32 controlarray[num_gamecontrols][MAXINPUTMAPPING], + boolean guest) { profile_t *new = Z_Malloc(sizeof(profile_t), PU_STATIC, NULL); UINT8 i; @@ -48,7 +54,7 @@ profile_t* PR_MakeProfile(const char *prname, const char *pname, const char *sna // Init both power levels for (i = 0; i < PWRLV_NUMTYPES; i++) { - new->powerlevels[i] = PWRLVRECORD_START; + new->powerlevels[i] = (guest ? 0 : PWRLVRECORD_START); } return new; @@ -57,7 +63,7 @@ profile_t* PR_MakeProfile(const char *prname, const char *pname, const char *sna profile_t* PR_MakeProfileFromPlayer(const char *prname, const char *pname, const char *sname, const UINT16 col, const char *fname, UINT16 fcol, UINT8 pnum) { // Generate profile using the player's gamecontrol, as we set them directly when making profiles from menus. - profile_t *new = PR_MakeProfile(prname, pname, sname, col, fname, fcol, gamecontrol[pnum]); + profile_t *new = PR_MakeProfile(prname, pname, sname, col, fname, fcol, gamecontrol[pnum], false); // Player bound cvars: new->kickstartaccel = cv_kickstartaccel[pnum].value; @@ -160,7 +166,14 @@ void PR_InitNewProfile(void) } } - dprofile = PR_MakeProfile(pname, PROFILEDEFAULTPNAME, PROFILEDEFAULTSKIN, PROFILEDEFAULTCOLOR, PROFILEDEFAULTFOLLOWER, PROFILEDEFAULTFOLLOWERCOLOR, gamecontroldefault); + dprofile = PR_MakeProfile( + pname, + PROFILEDEFAULTPNAME, + PROFILEDEFAULTSKIN, PROFILEDEFAULTCOLOR, + PROFILEDEFAULTFOLLOWER, PROFILEDEFAULTFOLLOWERCOLOR, + gamecontroldefault, + false + ); PR_AddProfile(dprofile); } @@ -189,7 +202,15 @@ void PR_SaveProfiles(void) void PR_LoadProfiles(void) { FILE *f = NULL; - profile_t *dprofile = PR_MakeProfile(PROFILEDEFAULTNAME, PROFILEDEFAULTPNAME, PROFILEDEFAULTSKIN, PROFILEDEFAULTCOLOR, PROFILEDEFAULTFOLLOWER, PROFILEDEFAULTFOLLOWERCOLOR, gamecontroldefault); + profile_t *dprofile = PR_MakeProfile( + PROFILEDEFAULTNAME, + PROFILEDEFAULTPNAME, + PROFILEDEFAULTSKIN, PROFILEDEFAULTCOLOR, + PROFILEDEFAULTFOLLOWER, PROFILEDEFAULTFOLLOWERCOLOR, + gamecontroldefault, + true + ); + f = fopen(va(pandf, srb2home, PROFILESFILE), "r"); if (f != NULL) diff --git a/src/k_profiles.h b/src/k_profiles.h index 775e12c91..b86ef6d50 100644 --- a/src/k_profiles.h +++ b/src/k_profiles.h @@ -32,8 +32,8 @@ #define PROFILESFILE "ringprofiles.prf" #define PROFILE_GUEST 0 -#define PROFILEDEFAULTNAME "guest" -#define PROFILEDEFAULTPNAME "Player" +#define PROFILEDEFAULTNAME "GUEST" +#define PROFILEDEFAULTPNAME "Guest" #define PROFILEDEFAULTSKIN "eggman" #define PROFILEDEFAULTCOLOR SKINCOLOR_NONE #define PROFILEDEFAULTFOLLOWER "none" @@ -78,7 +78,14 @@ INT32 PR_GetNumProfiles(void); // PR_MakeProfile // Makes a profile from the supplied profile name, player name, colour, follower, followercolour and controls. // The consvar values are left untouched. -profile_t* PR_MakeProfile(const char *prname, const char *pname, const char *sname, const UINT16 col, const char *fname, UINT16 fcol, INT32 controlarray[num_gamecontrols][MAXINPUTMAPPING]); +profile_t* PR_MakeProfile( + const char *prname, + const char *pname, + const char *sname, const UINT16 col, + const char *fname, const UINT16 fcol, + INT32 controlarray[num_gamecontrols][MAXINPUTMAPPING], + boolean guest +); // PR_MakeProfileFromPlayer // Makes a profile_t from the supplied profile name, player name, colour, follower and followercolour. diff --git a/src/y_inter.c b/src/y_inter.c index b005f1f01..be38fc510 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -504,7 +504,7 @@ void Y_IntermissionDrawer(void) { if (powertype != PWRLV_DISABLED && !clientpowerlevels[data.num[i]][powertype]) { - // No power level (splitscreen guests) + // No power level (guests) STRBUFCPY(strtime, "----"); } else