Simplify fix

pickedchar doesn't need to be set in these two places, since G_DeferedInitNew already does that.
This commit is contained in:
Lactozilla 2023-10-31 16:45:47 -03:00
parent 4e446d22d6
commit e9637322f9
2 changed files with 1 additions and 8 deletions

View file

@ -1492,10 +1492,7 @@ void G_BeginRecording(void)
demo_p += 16; demo_p += 16;
// Skin // Skin
const char *skinname = cv_skin.string; const char *skinname = skins[players[0].skin].name;
if (pickedchar >= 0 && pickedchar < numskins)
skinname = skins[pickedchar].name;
for (i = 0; i < 16 && skinname[i]; i++) for (i = 0; i < 16 && skinname[i]; i++)
name[i] = skinname[i]; name[i] = skinname[i];
for (; i < 16; i++) for (; i < 16; i++)

View file

@ -10372,8 +10372,6 @@ static void M_ChooseNightsAttack(INT32 choice)
sprintf(gpath,"replay"PATHSEP"%s"PATHSEP"%s", timeattackfolder, G_BuildMapName(cv_nextmap.value)); sprintf(gpath,"replay"PATHSEP"%s"PATHSEP"%s", timeattackfolder, G_BuildMapName(cv_nextmap.value));
snprintf(nameofdemo, sizeof nameofdemo, "%s-%s-last", gpath, skins[cv_chooseskin.value-1].name); snprintf(nameofdemo, sizeof nameofdemo, "%s-%s-last", gpath, skins[cv_chooseskin.value-1].name);
pickedchar = cv_chooseskin.value-1;
if (!cv_autorecord.value) if (!cv_autorecord.value)
remove(va("%s"PATHSEP"%s.lmp", srb2home, nameofdemo)); remove(va("%s"PATHSEP"%s.lmp", srb2home, nameofdemo));
else else
@ -10403,8 +10401,6 @@ static void M_ChooseTimeAttack(INT32 choice)
sprintf(gpath,"replay"PATHSEP"%s"PATHSEP"%s", timeattackfolder, G_BuildMapName(cv_nextmap.value)); sprintf(gpath,"replay"PATHSEP"%s"PATHSEP"%s", timeattackfolder, G_BuildMapName(cv_nextmap.value));
snprintf(nameofdemo, sizeof nameofdemo, "%s-%s-last", gpath, skins[cv_chooseskin.value-1].name); snprintf(nameofdemo, sizeof nameofdemo, "%s-%s-last", gpath, skins[cv_chooseskin.value-1].name);
pickedchar = cv_chooseskin.value-1;
if (!cv_autorecord.value) if (!cv_autorecord.value)
remove(va("%s"PATHSEP"%s.lmp", srb2home, nameofdemo)); remove(va("%s"PATHSEP"%s.lmp", srb2home, nameofdemo));
else else