Fix metal recordings not being saved in srb2home

This commit is contained in:
SteelT 2021-08-22 16:13:40 -04:00
parent 4309b592f8
commit 4a6acc2c8d

View file

@ -2422,12 +2422,13 @@ ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(boolean kill)
{
WRITEUINT8(demo_p, (kill) ? METALDEATH : DEMOMARKER); // add the demo end (or metal death) marker
WriteDemoChecksum();
saved = FIL_WriteFile(va("%sMS.LMP", G_BuildMapName(gamemap)), demobuffer, demo_p - demobuffer); // finally output the file.
sprintf(demoname, "%sMS.LMP", G_BuildMapName(gamemap));
saved = FIL_WriteFile(va(pandf, srb2home, demoname), demobuffer, demo_p - demobuffer); // finally output the file.
}
free(demobuffer);
metalrecording = false;
if (saved)
I_Error("Saved to %sMS.LMP", G_BuildMapName(gamemap));
I_Error("Saved to %s", demoname);
I_Error("Failed to save demo!");
}