]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/content_sao.h
Fix some reference counters (memleak) (#8981)
[dragonfireclient.git] / src / content_sao.h
index 2dd839e119f2a888803732d7a7ed90c7a8fee2cf..e9047daf0aa47131c27a4ab2811d0225400c119d 100644 (file)
@@ -122,10 +122,10 @@ class LuaEntitySAO : public UnitSAO
        bool isStaticAllowed() const
        { return m_prop.static_save; }
        void getStaticData(std::string *result) const;
-       int punch(v3f dir,
+       u16 punch(v3f dir,
                const ToolCapabilities *toolcap = nullptr,
                ServerActiveObject *puncher = nullptr,
-               float time_from_last_punch = 1000000);
+               float time_from_last_punch = 1000000.0f);
        void rightClick(ServerActiveObject *clicker);
        void setPos(const v3f &pos);
        void moveTo(v3f pos, bool continuous);
@@ -258,7 +258,7 @@ class PlayerSAO : public UnitSAO
                Interaction interface
        */
 
-       int punch(v3f dir,
+       u16 punch(v3f dir,
                const ToolCapabilities *toolcap,
                ServerActiveObject *puncher,
                float time_from_last_punch);
@@ -277,7 +277,7 @@ class PlayerSAO : public UnitSAO
        void setInventoryModified() {}
        std::string getWieldList() const { return "main"; }
        u16 getWieldIndex() const;
-       ItemStack getWieldedItem() const;
+       ItemStack getWieldedItem(ItemStack *selected, ItemStack *hand = nullptr) const;
        bool setWieldedItem(const ItemStack &item);
 
        /*