From e9c9b66ae92f4b95061d2b93e5db182d0c80b526 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 2 Sep 2014 12:53:20 -0400 Subject: Make players check inventory modification properly --- src/player.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/player.h') 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; -- cgit v1.2.3