Just to keep track of the bug: It is similar to this one:
http://dplogin.com/dplogin/featurevote/feature.php?id=10313In the demo playback menu, the button and a double-click execute:
command "demomap $menu_demofile$.dm2; menu off"
where
demomap $menu_demofile$.dm2
is the part causing problems if $menu_demofile$ contains spaces.
Let's say the demo's filename is "my demo.dm2", so $menu_demofile$ would be "my demo". The above command evaluates to
demomap my demo.dm2
The demomap command (SV_DemoMap_f) passes the first argument ("my") in the command line as the filename to the map command (SV_Map function), which will now try to load "my" as a map. It adds ".bsp" since there is no .dm2 file extension anymore. There is no map file called "my.bsp", so the loading process fails from now on.
Possible fixes:
demomap "my demo.dm2"
works when entering it in the console, so somehow making the menu put the content of $menu_demofile$ in quotation marks would help, but I don't think its possible with the current menu parsing.
or:
make the demomap command pass on the whole rest of the command line as a parameter so the file name does not get cut off at a space. This is somewhat hacky but seems to work. Can be done by replacing
SV_Map(true, Cmd_Argv(1), false);
with
SV_Map(true, Cmd_Args(), false);
in sv_ccmds.c, line 474
I guess as long as it's not really fixed, paintball should at least fail with an error that makes sense for the user, like "demo names may not contain spaces".