mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Make players check inventory modification properly
This commit is contained in:
parent
8b3135a643
commit
e9c9b66ae9
6 changed files with 39 additions and 9 deletions
11
src/player.h
11
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue