Commit 077e58415a7f6f2c55865be2c2fc35892450dd38
- Diff rendering mode:
- inline
- side by side
ChangeLog
(5 / 0)
|   | |||
| 1 | 2006-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl> | ||
| 2 | |||
| 3 | * src/main.cpp: Fixed the loading of updates and made skipping the | ||
| 4 | update process also skip the loading of updates. | ||
| 5 | |||
| 1 | 6 | 2006-07-24 Björn Steinbrink <B.Steinbrink@gmx.de> | |
| 2 | 7 | ||
| 3 | 8 | * src/localplayer.cpp, src/being.cpp: Fixed setDirection() semantics. |
src/being.h
(0 / 1)
|   | |||
| 89 | 89 | }; | |
| 90 | 90 | ||
| 91 | 91 | ||
| 92 | |||
| 93 | 92 | /** | |
| 94 | 93 | * Directions, to be used as bitmask values | |
| 95 | 94 | */ |
src/main.cpp
(12 / 6)
|   | |||
| 134 | 134 | if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) && | |
| 135 | 135 | (errno != EEXIST)) | |
| 136 | 136 | { | |
| 137 | std::cout << homeDir << " can't be made, but it doesn't exist! Exitting." << std::endl; | ||
| 137 | std::cout << homeDir | ||
| 138 | << " can't be made, but it doesn't exist! Exitting." | ||
| 139 | << std::endl; | ||
| 138 | 140 | exit(1); | |
| 139 | 141 | } | |
| 140 | 142 | #endif | |
| … | … | ||
| 147 | 147 | ResourceManager *resman = ResourceManager::getInstance(); | |
| 148 | 148 | ||
| 149 | 149 | if (!resman->setWriteDir(homeDir)) { | |
| 150 | std::cout << homeDir << " couldn't be set as home directory! Exitting." << std::endl; | ||
| 150 | std::cout << homeDir | ||
| 151 | << " couldn't be set as home directory! Exitting." | ||
| 152 | << std::endl; | ||
| 151 | 153 | exit(1); | |
| 152 | 154 | } | |
| 153 | 155 | ||
| … | … | ||
| 158 | 158 | // Creating and checking the updates folder existence and rights. | |
| 159 | 159 | if (!resman->isDirectory("/updates")) { | |
| 160 | 160 | if (!resman->mkdir("/updates")) { | |
| 161 | std::cout << homeDir << "/updates can't be made, but it doesn't exist! Exitting." << std::endl; | ||
| 162 | exit(1); | ||
| 161 | std::cout << homeDir << "/updates " | ||
| 162 | << "can't be made, but it doesn't exist! Exitting." | ||
| 163 | << std::endl; | ||
| 164 | exit(1); | ||
| 163 | 165 | } | |
| 164 | 166 | } | |
| 165 | 167 | ||
| … | … | ||
| 399 | 399 | const std::string updatesFile = "updates/resources.txt"; | |
| 400 | 400 | ResourceManager *resman = ResourceManager::getInstance(); | |
| 401 | 401 | std::vector<std::string> lines = resman->loadTextFile(updatesFile); | |
| 402 | std::string homeDir = config.getValue("homeDir", ""); | ||
| 402 | 403 | ||
| 403 | 404 | for (unsigned int i = 0; i < lines.size(); ++i) | |
| 404 | 405 | { | |
| 405 | resman->addToSearchPath(lines[i], false); | ||
| 406 | resman->addToSearchPath(homeDir + "/updates/" + lines[i], false); | ||
| 406 | 407 | } | |
| 407 | 408 | } | |
| 408 | 409 | ||
| … | … | ||
| 520 | 520 | SDL_Event event; | |
| 521 | 521 | ||
| 522 | 522 | if (options.skipUpdate && state != ERROR_STATE) { | |
| 523 | loadUpdates(); | ||
| 524 | 523 | state = LOGIN_STATE; | |
| 525 | 524 | } | |
| 526 | 525 | else { |

