]> git.lizzy.rs Git - minetest.git/blobdiff - src/serverenvironment.h
Optimize headers (part 2) (#6272)
[minetest.git] / src / serverenvironment.h
index 375b28f8a858bf16f4f300e0c5ddb700e28b3d6b..36f3e20673bba32b6502438078ed75b4c24f5bf8 100644 (file)
@@ -17,17 +17,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef SERVER_ENVIRONMENT_HEADER
-#define SERVER_ENVIRONMENT_HEADER
+#pragma once
 
+#include "activeobject.h"
 #include "environment.h"
 #include "mapnode.h"
-#include "mapblock.h"
+#include "settings.h"
+#include "util/numeric.h"
 #include <set>
 
 class IGameDef;
 class ServerMap;
 struct GameParams;
+class MapBlock;
 class RemotePlayer;
 class PlayerDatabase;
 class PlayerSAO;
@@ -88,8 +90,8 @@ struct LoadingBlockModifierDef
 
 struct LBMContentMapping
 {
-       typedef std::map<content_t, std::vector<LoadingBlockModifierDef *> > container_map;
-       container_map map;
+       typedef std::unordered_map<content_t, std::vector<LoadingBlockModifierDef *>> lbm_map;
+       lbm_map map;
 
        std::vector<LoadingBlockModifierDef *> lbm_list;
 
@@ -284,6 +286,11 @@ class ServerEnvironment : public Environment
        */
        ActiveObjectMessage getActiveObjectMessage();
 
+       virtual void getSelectedActiveObjects(
+               const core::line3d<f32> &shootline_on_map,
+               std::vector<PointedThing> &objects
+       );
+
        /*
                Activate objects and dynamically modify for the dtime determined
                from timestamp and additional_dtime
@@ -431,5 +438,3 @@ class ServerEnvironment : public Environment
        std::unordered_map<u32, float> m_particle_spawners;
        std::unordered_map<u32, u16> m_particle_spawner_attachments;
 };
-
-#endif