From 6b20ea075268863141f8e5e2e7a4f6926e0b3e1f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 30 Mar 2012 13:33:59 +0300 Subject: [PATCH] Fix walking sound of other players (and other objects) --- src/content_cao.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 90e99dc..03387d0 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -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());