aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index 001b53a40..e1f5bb3fb 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -39,6 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "gamedef.h"
#ifndef SERVER
#include "clientmap.h"
+#include "localplayer.h"
#endif
#include "daynightratio.h"
@@ -1888,7 +1889,8 @@ void ClientEnvironment::step(float dtime)
stepTimeOfDay(dtime);
// Get some settings
- bool free_move = g_settings->getBool("free_move");
+ bool fly_allowed = m_gamedef->checkLocalPrivilege("fly");
+ bool free_move = fly_allowed && g_settings->getBool("free_move");
// Get local player
LocalPlayer *lplayer = getLocalPlayer();