summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-03-19 03:04:16 +0100
committerPerttu Ahola <celeron55@gmail.com>2012-03-29 14:05:45 +0300
commitf8c3743991a6897c7133bf35dc2699b8b5f9df7c (patch)
treee856506d9c96d572d1a3b0a58edf00f0d70cba43 /src/inventory.cpp
parent072c265c301d3336203b77b8b1651fdacf3a7682 (diff)
downloadminetest-f8c3743991a6897c7133bf35dc2699b8b5f9df7c.tar.gz
minetest-f8c3743991a6897c7133bf35dc2699b8b5f9df7c.tar.bz2
minetest-f8c3743991a6897c7133bf35dc2699b8b5f9df7c.zip
added PlayerSAO and RemotePlayer, removed ServerRemotePlayer
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 056cf552d..3d6707f60 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -795,6 +795,18 @@ void Inventory::clear()
m_lists.clear();
}
+void Inventory::clearContents()
+{
+ for(u32 i=0; i<m_lists.size(); i++)
+ {
+ InventoryList *list = m_lists[i];
+ for(u32 j=0; j<list->getSize(); j++)
+ {
+ list->deleteItem(j);
+ }
+ }
+}
+
Inventory::Inventory(IItemDefManager *itemdef)
{
m_itemdef = itemdef;