Optimize and fix autodownload feature

The commit:
1. fixes value of download speed in KB;
2. introduces unique names of progress_callback() functions;
3. removes one unnecessary write_callback() function;
4. removes duplicated code/info in loadmodel().
This commit is contained in:
aurhat
2014-11-26 21:05:07 +01:00
parent 2dc74797af
commit 6e0e7bb333
4 changed files with 9 additions and 18 deletions
+1 -6
View File
@@ -142,11 +142,6 @@ model *loadmodel(const char *name, int i, bool trydl)
defformatstring(dl)("packages/models/%s", name);
requirepackage(PCK_MAPMODEL, dl);
}
else
{
mdllookup.access(newstring(name), nomodel);
conoutf("\f3failed to load model %s", name);
}
}
}
popscontext();
@@ -154,7 +149,7 @@ model *loadmodel(const char *name, int i, bool trydl)
{
if(!trydl)
{
conoutf(_("failed to load model %s"), name);
conoutf("\f3failed to load model %s", name);
if(!nomodel) nomodel = new md2("nomodel");
m = nomodel;
mdllookup.access(newstring(name), m);