Merge branch 'pickedchar-fix' into 'next'

Fix #1126 and #1127

Closes #1127 and #1126

See merge request STJr/SRB2!2189
This commit is contained in:
Alam Ed Arias 2023-11-02 23:53:45 +00:00
commit 9b60fd824a
2 changed files with 6 additions and 4 deletions

View file

@ -1614,6 +1614,9 @@ void D_SRB2Main(void)
if (D_CheckNetGame())
autostart = true;
if (!dedicated)
pickedchar = R_SkinAvailable(cv_defaultskin.string);
// check for a driver that wants intermission stats
// start the apropriate game based on parms
if (M_CheckParm("-metal"))
@ -1627,8 +1630,6 @@ void D_SRB2Main(void)
autostart = true;
}
pickedchar = R_SkinAvailable(cv_defaultskin.string);
// user settings come before "+" parameters.
if (dedicated)
COM_ImmedExecute(va("exec \"%s"PATHSEP"adedserv.cfg\"\n", srb2home));

View file

@ -1492,8 +1492,9 @@ void G_BeginRecording(void)
demo_p += 16;
// Skin
for (i = 0; i < 16 && cv_skin.string[i]; i++)
name[i] = cv_skin.string[i];
const char *skinname = skins[players[0].skin].name;
for (i = 0; i < 16 && skinname[i]; i++)
name[i] = skinname[i];
for (; i < 16; i++)
name[i] = '\0';
M_Memcpy(demo_p,name,16);