diff options
author | JacobF <queatz@gmail.com> | 2011-09-01 17:16:55 -0400 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-09-06 16:36:11 +0300 |
commit | c68ea19e8dd54c497b0fd3f16f26d063318e8bf6 (patch) | |
tree | e62c483bb35e0b7c13f8c7f05267b1aab78e9aa9 /src/content_sao.cpp | |
parent | 2d872ce3fab0887f97adb4d57fc043e08f44d276 (diff) | |
download | hax-minetest-server-c68ea19e8dd54c497b0fd3f16f26d063318e8bf6.tar.gz hax-minetest-server-c68ea19e8dd54c497b0fd3f16f26d063318e8bf6.zip |
Now SAOs will reflect changes to their temporary inventory object
Also, the temp item wasn't being deleted, might have been a memory leak.
Now you will only eat 1 item off a stack
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 638f50c9d..0bb518c16 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -226,6 +226,11 @@ void ItemSAO::rightClick(Player *player) if(to_be_deleted) m_removed = true; + else + // Reflect changes to the item here + m_inventorystring = item->getItemString(); + + delete item; } /* |