aboutsummaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/player.h b/src/player.h
index 7c8077d38..42d6af3f0 100644
--- a/src/player.h
+++ b/src/player.h
@@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "constants.h"
#include "network/networkprotocol.h"
#include "util/basic_macros.h"
+#include "util/pointedthing.h"
#include <list>
#include <mutex>
@@ -200,6 +201,13 @@ public:
// Returns non-empty `selected` ItemStack. `hand` is a fallback, if specified
ItemStack &getWieldedItem(ItemStack *selected, ItemStack *hand) const;
+
+ // item currently in secondary hand is returned in `offhand`
+ // item to use for place / secondary_use (either main or offhand) is (optionally) returned in `place`
+ // return value: whether to use main or offhand for placing
+ bool getOffhandWieldedItem(ItemStack *offhand, ItemStack *place,
+ IItemDefManager *idef, const PointedThing &pointed) const;
+
void setWieldIndex(u16 index);
u16 getWieldIndex() const { return m_wield_index; }