- // "Material" properties of a player
- MaterialProperties mp;
- mp.diggability = DIGGABLE_NORMAL;
- mp.crackiness = -0.5;
- mp.cuttability = 0.5;
-
- IItemDefManager *idef = m_env->getGameDef()->idef();
- ItemStack punchitem = puncher->getWieldedItem();
- ToolDiggingProperties tp =
- punchitem.getToolDiggingProperties(idef);
-
- HittingProperties hitprop = getHittingProperties(&mp, &tp,
- time_from_last_punch);
+ // "Material" groups of the player
+ ItemGroupList groups;
+ groups["choppy"] = 2;
+ groups["fleshy"] = 3;
+
+ HitParams hitparams = getHitParams(groups, toolcap, time_from_last_punch);