autodl switch

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7386 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2013-03-22 20:18:40 +00:00
parent ebade6105b
commit a6e408eb13
+2 -1
View File
@@ -878,6 +878,7 @@ vector<pckserver *> pckservers;
hashtable<const char *, package *> pendingpackages;
// cubescript
VARP(autodownload, 0, 1, 1);
void resetpckservers()
{
@@ -1044,7 +1045,7 @@ int downloadpackages()
bool requirepackage(int type, const char *path)
{
if(!havecurl || canceldownloads || type < 0 || type >= PCK_NUM || pendingpackages.access(path)) return false;
if(!havecurl || canceldownloads || !autodownload || type < 0 || type >= PCK_NUM || pendingpackages.access(path)) return false;
package *pck = new package;
pck->name = unixpath(newstring(path));