filename filtering for media files

No more spaces in filenames. The only allowed chars are a-z, A-Z, 0-9 and
"-_.()".

An exception are texture filenames, which may also have a prefix command
like "<decal>" included.

Also fixed some memory leaks in media download.
This commit is contained in:
ac-stef
2015-05-18 14:46:03 +02:00
parent e318ecd68e
commit 786a6cdce1
8 changed files with 71 additions and 29 deletions
+1
View File
@@ -811,6 +811,7 @@ COMMANDF(registersound, "siii", (char *name, int *vol, int *loop, int *audiblera
COMMANDF(mapsound, "si", (char *name, int *maxuses)
{
filtertext(name, name, FTXT__MEDIAFILEPATH);
audiomgr.addsound(name, 255, *maxuses, true, mapsounds, false, 0);
intret(mapconfigdata.mapsoundlines.length());
copystring(mapconfigdata.mapsoundlines.add().name, name);