Tune caves
[oweals/minetest.git] / src / serverobject.h
index 94ceb4895c4feb9bee56393dafeaf381c1734eee..15bbe52f7bbf8e132d2e3497ff3868c434eb4564 100644 (file)
@@ -42,9 +42,9 @@ Some planning
 */
 
 class ServerEnvironment;
-class ItemStack;
+struct ItemStack;
 class Player;
-struct ToolDiggingProperties;
+struct ToolCapabilities;
 
 class ServerActiveObject : public ActiveObject
 {
@@ -133,10 +133,12 @@ public:
        virtual bool isStaticAllowed() const
        {return true;}
        
-       // time_from_last_punch is used for lessening damage if punching fast
-       virtual void punch(ServerActiveObject *puncher,
+       // Returns tool wear
+       virtual int punch(v3f dir,
+                       const ToolCapabilities *toolcap=NULL,
+                       ServerActiveObject *puncher=NULL,
                        float time_from_last_punch=1000000)
-       {}
+       { return 0; }
        virtual void rightClick(ServerActiveObject *clicker)
        {}
        virtual void setHP(s16 hp)