File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -862,16 +862,17 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
862
862
863
863
float moved = lastpos.getDistanceFrom (pos_translator.vect_show );
864
864
m_step_distance_counter += moved;
865
- if (m_step_distance_counter > 1.5 *BS)
866
- {
867
- m_step_distance_counter = 0 ;
868
- if (!m_is_local_player && m_prop.makes_footstep_sound )
869
- {
865
+ if (m_step_distance_counter > 1 .5f * BS) {
866
+ m_step_distance_counter = 0 .0f ;
867
+ if (!m_is_local_player && m_prop.makes_footstep_sound ) {
870
868
INodeDefManager *ndef = m_client->ndef ();
871
- v3s16 p = floatToInt (getPosition () + v3f ( 0 ,
872
- ( m_prop.collisionbox .MinEdge .Y - 0.5 )* BS, 0 ), BS);
869
+ v3s16 p = floatToInt (getPosition () +
870
+ v3f ( 0 . 0f , ( m_prop.collisionbox .MinEdge .Y - 0 . 5f ) * BS, 0 . 0f ), BS);
873
871
MapNode n = m_env->getMap ().getNodeNoEx (p);
874
872
SimpleSoundSpec spec = ndef->get (n).sound_footstep ;
873
+ // Reduce footstep gain, as non-local-player footsteps are
874
+ // somehow louder.
875
+ spec.gain *= 0 .6f ;
875
876
m_client->sound ()->playSoundAt (spec, false , getPosition ());
876
877
}
877
878
}
You can’t perform that action at this time.
0 commit comments