Fix player rotations (#7941)
[oweals/minetest.git] / src / serverenvironment.h
index f4996cdc61a552d77f61fa7f22d93c84847a9887..b7a121adff241706fc2e3161676cfc28df4a4cd9 100644 (file)
@@ -32,6 +32,7 @@ struct GameParams;
 class MapBlock;
 class RemotePlayer;
 class PlayerDatabase;
+class AuthDatabase;
 class PlayerSAO;
 class ServerEnvironment;
 class ActiveBlockModifier;
@@ -232,9 +233,6 @@ public:
        */
        void saveMeta();
        void loadMeta();
-       // to be called instead of loadMeta if
-       // env_meta.txt doesn't exist (e.g. new world)
-       void loadDefaultMeta();
 
        u32 addParticleSpawner(float exptime);
        u32 addParticleSpawner(float exptime, u16 attached_id);
@@ -369,10 +367,21 @@ public:
 
        static bool migratePlayersDatabase(const GameParams &game_params,
                        const Settings &cmd_args);
+
+       AuthDatabase *getAuthDatabase() { return m_auth_database; }
+       static bool migrateAuthDatabase(const GameParams &game_params,
+                       const Settings &cmd_args);
 private:
 
+       /**
+        * called if env_meta.txt doesn't exist (e.g. new world)
+        */
+       void loadDefaultMeta();
+
        static PlayerDatabase *openPlayerDatabase(const std::string &name,
                        const std::string &savedir, const Settings &conf);
+       static AuthDatabase *openAuthDatabase(const std::string &name,
+                       const std::string &savedir, const Settings &conf);
        /*
                Internal ActiveObject interface
                -------------------------------------------
@@ -465,6 +474,7 @@ private:
        std::vector<RemotePlayer*> m_players;
 
        PlayerDatabase *m_player_database = nullptr;
+       AuthDatabase *m_auth_database = nullptr;
 
        // Particles
        IntervalLimiter m_particle_management_interval;