Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-01-19 23:08:14 +0000
committerStijn Buys <ingar@osirion.org>2013-01-19 23:08:14 +0000
commit51cc17b67fa8813ad8cedae0f2584d25deaa38ae (patch)
tree8355b6a6759df7d129b10927a86a08c7e323cd96 /src/game
parent05a2f36cfa6550a457c3a9e358b088077fe4c8da (diff)
Do not print an error message if a savegame has no spawn set.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/savegame.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/base/savegame.cc b/src/game/base/savegame.cc
index 616b85f..ca911ec 100644
--- a/src/game/base/savegame.cc
+++ b/src/game/base/savegame.cc
@@ -105,7 +105,9 @@ void SaveGame::load_game(core::Player *player, filesystem::IniFile & inifile)
continue;
} else if (inifile.got_key_string("spawn", str)) {
- if (str.size() < 3) {
+ if (!str.size()) {
+ continue;
+ } else if (str.size() < 3) {
inifile.unknown_error("spawn with invalid label '" + str + "'");
continue;
}
@@ -237,7 +239,9 @@ void SaveGame::load_game(core::Player *player, filesystem::IniFile & inifile)
if (!zone) {
zone = Default::zone;
}
-
+ if (!ship->spawn()) {
+ ship->set_spawn(zone->default_view());
+ }
if (!ship->spawn()) {
ship->set_spawn(Default::view);
}