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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user