summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-30 18:51:15 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-30 18:51:15 +0300
commitd62ae0e18bc570033ada07454b1642f696fe17b1 (patch)
tree69564fe33c88a90e74ccf0da356e9664ecc32817 /src/content_sao.cpp
parent4556c212dba726271352b05a9299564e05abb218 (diff)
downloadminetest-d62ae0e18bc570033ada07454b1642f696fe17b1.tar.gz
minetest-d62ae0e18bc570033ada07454b1642f696fe17b1.tar.bz2
minetest-d62ae0e18bc570033ada07454b1642f696fe17b1.zip
Rats are now eatable. Also made their selection box move smoothly.
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index eadaa6e5f..638f50c9d 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -215,6 +215,18 @@ InventoryItem * ItemSAO::createInventoryItem()
}
}
+void ItemSAO::rightClick(Player *player)
+{
+ dstream<<__FUNCTION_NAME<<std::endl;
+ InventoryItem *item = createInventoryItem();
+ if(item == NULL)
+ return;
+
+ bool to_be_deleted = item->use(m_env, player);
+
+ if(to_be_deleted)
+ m_removed = true;
+}
/*
RatSAO