summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-09-02 12:53:20 -0400
committerShadowNinja <shadowninja@minetest.net>2014-10-01 18:44:36 -0400
commite9c9b66ae92f4b95061d2b93e5db182d0c80b526 (patch)
tree11dadc5c6fff4e2060401e4cc552593ba6c53a8b /src/player.h
parent8b3135a64350a045dbb0b9a6ce1dad61cba0c532 (diff)
downloadminetest-e9c9b66ae92f4b95061d2b93e5db182d0c80b526.tar.gz
minetest-e9c9b66ae92f4b95061d2b93e5db182d0c80b526.tar.bz2
minetest-e9c9b66ae92f4b95061d2b93e5db182d0c80b526.zip
Make players check inventory modification properly
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/player.h b/src/player.h
index aa38996a5..a5cc7123f 100644
--- a/src/player.h
+++ b/src/player.h
@@ -226,9 +226,16 @@ public:
void serialize(std::ostream &os);
void deSerialize(std::istream &is, std::string playername);
- bool checkModified()
+ bool checkModified() const
{
- return m_dirty;
+ return m_dirty || inventory.checkModified();
+ }
+
+ void setModified(const bool x)
+ {
+ m_dirty = x;
+ if (x == false)
+ inventory.setModified(x);
}
bool touching_ground;