Tune group digging time stuff a bit
authorPerttu Ahola <celeron55@gmail.com>
Sun, 4 Mar 2012 11:40:40 +0000 (13:40 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 10 Mar 2012 09:28:13 +0000 (11:28 +0200)
src/serverremoteplayer.cpp
src/tool.cpp

index 8a81f1d2dd2519be19b7a62ff3f0ef95f816c148..9dd4723fd527be0412ccb900533158cacc7bb105 100644 (file)
@@ -183,8 +183,8 @@ void ServerRemotePlayer::punch(ServerActiveObject *puncher,
        
        // "Material" groups of the player
        std::map<std::string, int> groups;
-       groups["snappy"] = 1;
        groups["choppy"] = 2;
+       groups["fleshy"] = 3;
 
        IItemDefManager *idef = m_env->getGameDef()->idef();
        ItemStack punchitem = puncher->getWieldedItem();
index 3c61ad6e723b88a2da5bc6e7bf93367b2d5c293a..69141f4e5a4b30be0884d3fc124217e87f2ce901 100644 (file)
@@ -135,10 +135,10 @@ HitParams getHitParams(const std::map<std::string, int> &groups,
        DigParams digprop = getDigParams(groups, tp,
                        time_from_last_punch);
        
-       // If digging time would be 1 second, 8 half-hearts go in 1 second.
+       // Damage in hp is equivalent to nodes dug in time_from_last_punch
        s16 hp = 0;
        if(digprop.diggable)
-               hp = 8.0 / digprop.time;
+               hp = time_from_last_punch / digprop.time;
        // Wear is the same as for digging a single node
        s16 wear = (float)digprop.wear;