summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-23 00:18:48 +0200
committerBertram <bertram@cegetel.net>2009-10-23 00:18:48 +0200
commit86e5e4c5bd29abcd90d21a64fdea7eac73665356 (patch)
treecd9c92fd4abb3aee9a1fc38945deee136952414a /src/main.cpp
parentd9eb7650ed1bc11de9d96ed9a387501238663094 (diff)
downloadmana-86e5e4c5bd29abcd90d21a64fdea7eac73665356.tar.gz
mana-86e5e4c5bd29abcd90d21a64fdea7eac73665356.tar.bz2
mana-86e5e4c5bd29abcd90d21a64fdea7eac73665356.tar.xz
mana-86e5e4c5bd29abcd90d21a64fdea7eac73665356.zip
Refixed the -u and -d parameter again, resolving for sure Mantis #951 ;)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9b10448e..a0486a6a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -186,7 +186,6 @@ struct Options
printHelp(false),
printVersion(false),
skipUpdate(false),
- skipUpdateLoad(false),
chooseDefault(false),
noOpenGL(false),
serverPort(0)
@@ -195,7 +194,6 @@ struct Options
bool printHelp;
bool printVersion;
bool skipUpdate;
- bool skipUpdateLoad;
bool chooseDefault;
bool noOpenGL;
std::string username;
@@ -555,7 +553,6 @@ static void printHelp()
<< _(" -p --port : Login server port") << endl
<< _(" -s --server : Login server name or IP") << endl
<< _(" -u --skip-update : Skip the update downloads") << endl
- << _(" -l --skip-load : Skip loading the updates") << endl
<< _(" -U --username : Login with this username") << endl
#ifdef USE_OPENGL
<< _(" -O --no-opengl : Disable OpenGL for this session") << endl
@@ -570,7 +567,7 @@ static void printVersion()
static void parseOptions(int argc, char *argv[], Options &options)
{
- const char *optstring = "hvuld:U:P:Dc:s:p:C:H:S:O";
+ const char *optstring = "hvud:U:P:Dc:s:p:C:H:S:O";
const struct option long_options[] = {
{ "config-file", required_argument, 0, 'C' },
@@ -584,7 +581,6 @@ static void parseOptions(int argc, char *argv[], Options &options)
{ "port", required_argument, 0, 'p' },
{ "server", required_argument, 0, 's' },
{ "skip-update", no_argument, 0, 'u' },
- { "skip-load", no_argument, 0, 'l' },
{ "username", required_argument, 0, 'U' },
{ "no-opengl", no_argument, 0, 'O' },
{ "version", no_argument, 0, 'v' },
@@ -632,9 +628,6 @@ static void parseOptions(int argc, char *argv[], Options &options)
case 'u':
options.skipUpdate = true;
break;
- case 'l':
- options.skipUpdateLoad = true;
- break;
case 'U':
options.username = optarg;
break;
@@ -1049,17 +1042,20 @@ int main(int argc, char *argv[])
case STATE_LOAD_DATA:
logger->log("State: LOAD DATA");
- // Load the updates downloaded so far...
- if (!options.skipUpdateLoad)
+ // If another data path has been set,
+ // we don't load any other files...
+ if (options.dataPath.empty())
{
+ // Load the updates downloaded so far...
loadUpdates();
- }
- // Also add customdata directory
- ResourceManager::getInstance()->searchAndAddArchives(
+
+ // Also add customdata directory
+ ResourceManager::getInstance()->searchAndAddArchives(
"customdata/",
"zip",
false);
+ }
// Load XML databases
ColorDB::load();