G_DoPlayDemo: prepend srb2home to the demo name (if an external file) so that demos in custom home paths can be loaded

This commit is contained in:
Monster Iestyn 2018-01-11 16:55:42 +00:00
parent 1ab5273400
commit 602701d6dd
1 changed files with 6 additions and 1 deletions

View File

@ -1452,7 +1452,12 @@ static void Command_Playdemo_f(void)
CONS_Printf(M_GetText("Playing back demo '%s'.\n"), name);
G_DoPlayDemo(name);
// Internal if no extension, external if one exists
// If external, convert the file name to a path in SRB2's home directory
if (FIL_CheckExtension(name))
G_DoPlayDemo(va("%s"PATHSEP"%s", srb2home, name))
else
G_DoPlayDemo(name);
}
static void Command_Timedemo_f(void)