Fix walking sound of other players (and other objects)
authorPerttu Ahola <celeron55@gmail.com>
Fri, 30 Mar 2012 10:33:59 +0000 (13:33 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 30 Mar 2012 10:34:25 +0000 (13:34 +0300)
src/content_cao.cpp

index 90e99dc08aa8283436bd6519047f7a2bf93599bc..03387d030f020e23ea29e1a71a358805f2c3f20d 100644 (file)
@@ -885,7 +885,8 @@ public:
                        m_step_distance_counter = 0;
                        if(!m_is_local_player && m_prop.makes_footstep_sound){
                                INodeDefManager *ndef = m_gamedef->ndef();
-                               v3s16 p = floatToInt(getPosition()+v3f(0,-0.5*BS, 0), BS);
+                               v3s16 p = floatToInt(getPosition() + v3f(0,
+                                               (m_prop.collisionbox.MinEdge.Y-0.5)*BS, 0), BS);
                                MapNode n = m_env->getMap().getNodeNoEx(p);
                                SimpleSoundSpec spec = ndef->get(n).sound_footstep;
                                m_gamedef->sound()->playSoundAt(spec, false, getPosition());