@@ -86,9 +86,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
86
86
bool noclip = m_gamedef->checkLocalPrivilege (" noclip" ) &&
87
87
g_settings->getBool (" noclip" );
88
88
bool free_move = noclip && fly_allowed && g_settings->getBool (" free_move" );
89
- if (free_move)
90
- {
91
- position += m_speed * dtime;
89
+ if (free_move) {
90
+ position += m_speed * dtime;
92
91
setPosition (position);
93
92
m_sneak_node_exists = false ;
94
93
return ;
@@ -408,11 +407,12 @@ void LocalPlayer::applyControl(float dtime)
408
407
// When aux1_descends is enabled the fast key is used to go down, so fast isn't possible
409
408
bool fast_climb = fast_move && control.aux1 && !g_settings->getBool (" aux1_descends" );
410
409
bool continuous_forward = g_settings->getBool (" continuous_forward" );
410
+ bool always_fly_fast = g_settings->getBool (" always_fly_fast" );
411
411
412
412
// Whether superspeed mode is used or not
413
413
bool superspeed = false ;
414
414
415
- if (g_settings-> getBool ( " always_fly_fast" ) && free_move && fast_move)
415
+ if ( always_fly_fast && free_move && fast_move)
416
416
superspeed = true ;
417
417
418
418
// Old descend control
@@ -470,7 +470,7 @@ void LocalPlayer::applyControl(float dtime)
470
470
if (free_move)
471
471
{
472
472
// In free movement mode, sneak descends
473
- if (fast_move && (control.aux1 || g_settings-> getBool ( " always_fly_fast" ) ))
473
+ if (fast_move && (control.aux1 || always_fly_fast))
474
474
speedV.Y = -movement_speed_fast;
475
475
else
476
476
speedV.Y = -movement_speed_walk;
@@ -517,11 +517,9 @@ void LocalPlayer::applyControl(float dtime)
517
517
}
518
518
if (control.jump )
519
519
{
520
- if (free_move)
521
- {
522
- if (g_settings->getBool (" aux1_descends" ) || g_settings->getBool (" always_fly_fast" ))
523
- {
524
- if (fast_move)
520
+ if (free_move) {
521
+ if (g_settings->getBool (" aux1_descends" ) || always_fly_fast) {
522
+ if (fast_move)
525
523
speedV.Y = movement_speed_fast;
526
524
else
527
525
speedV.Y = movement_speed_walk;
0 commit comments