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:
parent
96ee73f790
commit
52122c342d
18 changed files with 928 additions and 740 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue