summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-24 10:33:22 -0700
committerIra Rice <irarice@gmail.com>2009-02-24 14:57:16 -0700
commit95c7c2fb3468a96415736d1f4d1faf28e6c81aa2 (patch)
tree7c4e1a372e0895aade1d829c763c15b892cd5fdc /src/main.cpp
parentf65c1e48107fa2cc615c86d8f6829b50c05baa3f (diff)
downloadmana-95c7c2fb3468a96415736d1f4d1faf28e6c81aa2.tar.gz
mana-95c7c2fb3468a96415736d1f4d1faf28e6c81aa2.tar.bz2
mana-95c7c2fb3468a96415736d1f4d1faf28e6c81aa2.tar.xz
mana-95c7c2fb3468a96415736d1f4d1faf28e6c81aa2.zip
Fix update handling
THis will prevent loading updates when -u is used, and prevent error messages in the log when -u is used.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 06ec2f75..f7468d84 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -586,6 +586,7 @@ void parseOptions(int argc, char *argv[], Options &options)
*/
void loadUpdates()
{
+ if (updatesDir.empty()) return;
const std::string updatesFile = "/" + updatesDir + "/resources2.txt";
ResourceManager *resman = ResourceManager::getInstance();
std::vector<std::string> lines = resman->loadTextFile(updatesFile);
@@ -971,8 +972,7 @@ int main(int argc, char *argv[])
}
else
{
- int nextState = (options.skipUpdate) ?
- LOADDATA_STATE : UPDATE_STATE;
+ int nextState = UPDATE_STATE;
currentDialog = new ServerSelectDialog(&loginData,
nextState);
positionDialog(currentDialog, screenWidth,
@@ -1032,18 +1032,18 @@ int main(int argc, char *argv[])
break;
case UPDATE_STATE:
- // Determine which source to use for the update host
- if (!options.updateHost.empty())
- updateHost = options.updateHost;
- else
- updateHost = loginData.updateHost;
-
- setUpdatesDir();
- logger->log("State: UPDATE");
-
if (options.skipUpdate) {
state = LOADDATA_STATE;
} else {
+ // Determine which source to use for the update host
+ if (!options.updateHost.empty())
+ updateHost = options.updateHost;
+ else
+ updateHost = loginData.updateHost;
+
+ setUpdatesDir();
+ logger->log("State: UPDATE");
+
currentDialog = new UpdaterWindow(updateHost,
homeDir + "/" + updatesDir);
positionDialog(currentDialog, screenWidth,