Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-10 19:20:06 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 19:20:06 +0000
commit5eaf6cc1f9ab772139a2dbe6d325a7ab9879e01b (patch)
tree5a6308ebee73df40e8f447213d7b5656e11e3210 /src/game/base/savegame.cc
parentcf2d30145dea77a1b27f04f07a7a58184cf72c37 (diff)
Prevent player reputation for the 'default' faction from getting loaded from savegame.
Diffstat (limited to 'src/game/base/savegame.cc')
-rw-r--r--src/game/base/savegame.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/base/savegame.cc b/src/game/base/savegame.cc
index 90b7956..28f0ddb 100644
--- a/src/game/base/savegame.cc
+++ b/src/game/base/savegame.cc
@@ -99,6 +99,8 @@ void SaveGame::load_game(core::Player *player, filesystem::IniFile & inifile)
} else if (inifile.got_key_float("reputation", reputation)) {
if (!faction) {
inifile.unknown_error("reputation without faction");
+ } else if (faction == Faction::default_faction()) {
+ inifile.unknown_error("ignoring reputation for default faction");
} else {
player->reputation().set_reputation(faction, reputation);
}