summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-07-24 19:48:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-07-24 19:48:33 +0000
commit077e58415a7f6f2c55865be2c2fc35892450dd38 (patch)
tree4936af8a5c56aecbf74e668c57e9b104cda4008a /src
parentb7f7b15995cfc9b41100e237bebc7f2c009e56b3 (diff)
downloadmana-client-077e58415a7f6f2c55865be2c2fc35892450dd38.tar.gz
mana-client-077e58415a7f6f2c55865be2c2fc35892450dd38.tar.bz2
mana-client-077e58415a7f6f2c55865be2c2fc35892450dd38.tar.xz
mana-client-077e58415a7f6f2c55865be2c2fc35892450dd38.zip
Fixed the loading of updates and made skipping the update process also skip thev0.0.20
loading of updates.
Diffstat (limited to 'src')
-rw-r--r--src/being.h1
-rw-r--r--src/main.cpp18
2 files changed, 12 insertions, 7 deletions
diff --git a/src/being.h b/src/being.h
index 41c9103d..478bc018 100644
--- a/src/being.h
+++ b/src/being.h
@@ -89,7 +89,6 @@ class Being : public Sprite
};
-
/**
* Directions, to be used as bitmask values
*/
diff --git a/src/main.cpp b/src/main.cpp
index 28debf47..86d29167 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -134,7 +134,9 @@ void init_engine()
if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
(errno != EEXIST))
{
- std::cout << homeDir << " can't be made, but it doesn't exist! Exitting." << std::endl;
+ std::cout << homeDir
+ << " can't be made, but it doesn't exist! Exitting."
+ << std::endl;
exit(1);
}
#endif
@@ -145,7 +147,9 @@ void init_engine()
ResourceManager *resman = ResourceManager::getInstance();
if (!resman->setWriteDir(homeDir)) {
- std::cout << homeDir << " couldn't be set as home directory! Exitting." << std::endl;
+ std::cout << homeDir
+ << " couldn't be set as home directory! Exitting."
+ << std::endl;
exit(1);
}
@@ -154,8 +158,10 @@ void init_engine()
// Creating and checking the updates folder existence and rights.
if (!resman->isDirectory("/updates")) {
if (!resman->mkdir("/updates")) {
- std::cout << homeDir << "/updates can't be made, but it doesn't exist! Exitting." << std::endl;
- exit(1);
+ std::cout << homeDir << "/updates "
+ << "can't be made, but it doesn't exist! Exitting."
+ << std::endl;
+ exit(1);
}
}
@@ -393,10 +399,11 @@ void loadUpdates()
const std::string updatesFile = "updates/resources.txt";
ResourceManager *resman = ResourceManager::getInstance();
std::vector<std::string> lines = resman->loadTextFile(updatesFile);
+ std::string homeDir = config.getValue("homeDir", "");
for (unsigned int i = 0; i < lines.size(); ++i)
{
- resman->addToSearchPath(lines[i], false);
+ resman->addToSearchPath(homeDir + "/updates/" + lines[i], false);
}
}
@@ -513,7 +520,6 @@ int main(int argc, char *argv[])
SDL_Event event;
if (options.skipUpdate && state != ERROR_STATE) {
- loadUpdates();
state = LOGIN_STATE;
}
else {