summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index a7e1ccd82..1c555dbee 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1215,9 +1215,19 @@ void the_game(
input->step(dtime);
/*
- Launch menus according to keys
+ Launch menus and trigger stuff according to keys
*/
- if(input->wasKeyDown(getKeySetting("keymap_inventory")))
+ if(input->wasKeyDown(getKeySetting("keymap_drop")))
+ {
+ // drop selected item
+ IDropAction *a = new IDropAction();
+ a->count = 0;
+ a->from_inv = "current_player";
+ a->from_list = "main";
+ a->from_i = g_selected_item;
+ client.inventoryAction(a);
+ }
+ else if(input->wasKeyDown(getKeySetting("keymap_inventory")))
{
infostream<<"the_game: "
<<"Launching inventory"<<std::endl;