Improve profile applying during startup

This allow cases can route around the title screen, such as if the `-connect` command line param is used, to work properly
This commit is contained in:
SteelT 2022-09-20 15:04:37 -04:00
parent 7a56e5ade6
commit ccff9a6ce2

View file

@ -1775,16 +1775,16 @@ void D_SRB2Main(void)
} }
} }
// Has to be done before anything else so skin, color, etc in command buffer has an affect.
// ttlprofilen used because it's roughly equivalent in functionality - a QoL aid for quickly getting from startup to action
PR_ApplyProfile(cv_ttlprofilen.value, 0);
if (autostart || netgame) if (autostart || netgame)
{ {
gameaction = ga_nothing; gameaction = ga_nothing;
CV_ClearChangedFlags(); CV_ClearChangedFlags();
// Has to be done before anything else so skin, color, etc in command buffer has an affect.
// ttlprofilen used because it's roughly equivalent in functionality - a QoL aid for quickly getting from startup to action
PR_ApplyProfile(cv_ttlprofilen.value, 0);
// Do this here so if you run SRB2 with eg +timelimit 5, the time limit counts // Do this here so if you run SRB2 with eg +timelimit 5, the time limit counts
// as having been modified for the first game. // as having been modified for the first game.
M_PushSpecialParameters(); // push all "+" parameter at the command buffer M_PushSpecialParameters(); // push all "+" parameter at the command buffer
@ -1887,9 +1887,13 @@ void D_SRB2Main(void)
else if (M_CheckParm("-skipintro")) else if (M_CheckParm("-skipintro"))
{ {
F_StartTitleScreen(); F_StartTitleScreen();
CV_StealthSetValue(&cv_currprofile, -1);
} }
else else
{
F_StartIntro(); // Tails 03-03-2002 F_StartIntro(); // Tails 03-03-2002
CV_StealthSetValue(&cv_currprofile, -1);
}
CON_ToggleOff(); CON_ToggleOff();