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>2011-07-12 13:34:57 +0000
committerStijn Buys <ingar@osirion.org>2011-07-12 13:34:57 +0000
commitbbbd41ccf4e7501e93689afecab442cb7e60a5de (patch)
tree7c1342b76b654364c8fb220f56d07bf09b9b7e8c
parentce7186b35372ede9d6a8e3af6e9aff72d632bbe6 (diff)
Interpret the Item::Tradeable flag when loading savegames.
-rw-r--r--src/game/base/game.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index bdca48a..5639e20 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -1889,7 +1889,11 @@ void Game::player_load(core::Player *player)
}
} else if (inifile.got_key_bool("tradeable", b)) {
if (item) {
- item->set_flag(core::Item::Tradeable);
+ if (b) {
+ item->set_flag(core::Item::Tradeable);
+ } else {
+ item->unset_flag(core::Item::Tradeable);
+ }
}
} else {
inifile.unknown_key();