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:
+2
-1
@@ -255,6 +255,7 @@ struct md3 : vertmodel
|
||||
void md3load(char *model)
|
||||
{
|
||||
if(!loadingmd3) { conoutf("not loading an md3"); return; };
|
||||
filtertext(model, model, FTXT__MEDIAFILEPATH);
|
||||
defformatstring(filename)("%s/%s", md3dir, model);
|
||||
md3::md3part &mdl = *new md3::md3part;
|
||||
loadingmd3->parts.add(&mdl);
|
||||
@@ -265,7 +266,7 @@ void md3load(char *model)
|
||||
|
||||
void md3skin(char *objname, char *skin)
|
||||
{
|
||||
if(!objname || !skin) return;
|
||||
filtertext(skin, skin, FTXT__MEDIAFILEPATH);
|
||||
if(!loadingmd3 || loadingmd3->parts.empty()) { conoutf("not loading an md3"); return; };
|
||||
md3::part &mdl = *loadingmd3->parts.last();
|
||||
bool used = false;
|
||||
|
||||
Reference in New Issue
Block a user