P_WriteThings: use map name in file name

This commit is contained in:
James R 2020-11-01 19:40:59 -08:00
parent 481c178a15
commit 8a616fb265

View file

@ -872,6 +872,7 @@ static void P_SpawnMapThings(boolean spawnemblems)
// Experimental groovy write function!
void P_WriteThings(void)
{
const char * filename;
size_t i, length;
mapthing_t *mt;
UINT8 *savebuffer, *savebuf_p;
@ -900,11 +901,13 @@ void P_WriteThings(void)
length = savebuf_p - savebuffer;
FIL_WriteFile(va("newthings%d.lmp", gamemap), savebuffer, length);
filename = va("newthings-%s.lmp", G_BuildMapName(gamemap));
FIL_WriteFile(filename, savebuffer, length);
free(savebuffer);
savebuf_p = NULL;
CONS_Printf(M_GetText("newthings%d.lmp saved.\n"), gamemap);
CONS_Printf(M_GetText("%s saved.\n"), filename);
}
//