From 602701d6ddb42b85cb4779f7dacf1be81852c89a Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 11 Jan 2018 16:55:42 +0000 Subject: [PATCH] G_DoPlayDemo: prepend srb2home to the demo name (if an external file) so that demos in custom home paths can be loaded --- src/d_netcmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 3696dd974..0d174548c 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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)