File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -996,12 +996,14 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
996996 m_velocity = v3f (0 ,0 ,0 );
997997 m_acceleration = v3f (0 ,0 ,0 );
998998 const PlayerControl &controls = player->getPlayerControl ();
999+ f32 new_speed = player->local_animation_speed ;
9991000
10001001 bool walking = false ;
1001- if (controls.movement_speed > 0 .001f )
1002+ if (controls.movement_speed > 0 .001f ) {
1003+ new_speed *= controls.movement_speed ;
10021004 walking = true ;
1005+ }
10031006
1004- f32 new_speed = player->local_animation_speed ;
10051007 v2s32 new_anim = v2s32 (0 ,0 );
10061008 bool allow_update = false ;
10071009
@@ -1016,7 +1018,6 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
10161018 // slowdown speed if sneaking
10171019 if (controls.sneak && walking)
10181020 new_speed /= 2 ;
1019- new_speed *= controls.movement_speed ;
10201021
10211022 if (walking && (controls.dig || controls.place )) {
10221023 new_anim = player->local_animations [3 ];
You can’t perform that action at this time.
0 commit comments