inventory: allow dropping the hand item on Shift+Throw

shapetextures
David Dormagen 2015-09-21 14:21:57 +02:00
parent 5b981be93c
commit 745f452afb
2 changed files with 18 additions and 0 deletions

View File

@ -64,6 +64,19 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
return true;
}
// Drop the mouse item?
if (ctrl == CON_Drop && !release)
{
var item = this->GetHandItem(0);
if (!item) return true;
this->DropInventoryItem(this->GetHandItemPos(0));
// And do not immediately collect another thing.
this.inventory.pickup_item = nil;
EndPickingUp();
return true;
}
// Switching pickup object or finish pickup?
if (this.inventory.is_picking_up)
{

View File

@ -615,6 +615,11 @@
Control=PickUpNext_Stop
Priority=75
[Assignment]
Key=CON_PickUp,CON_Throw
Control=Drop
Priority=75
[Assignment]
Key=Mouse1Wheel1Up
GUIGroup=50