1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add 'fly' and 'fast' privileges and the underlying privileges-to-client system

This commit is contained in:
Perttu Ahola 2012-03-31 16:23:26 +03:00
parent 96ee73f790
commit 52122c342d
18 changed files with 928 additions and 740 deletions

View file

@ -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();