summaryrefslogtreecommitdiff
path: root/src/serverenvironment.h
diff options
context:
space:
mode:
authorVitaliy <silverunicorn2011@yandex.ru>2018-04-03 09:23:46 +0300
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-04-03 08:23:46 +0200
commit528908a4c3dd190cb7a6007df1e3fcd8e4604bfa (patch)
treeecec86bd3388301bd67e2eb8e597f37b328f6764 /src/serverenvironment.h
parent2481ea27ce0f423f3e6f3522539d20e1500cf572 (diff)
downloadminetest-528908a4c3dd190cb7a6007df1e3fcd8e4604bfa.tar.gz
minetest-528908a4c3dd190cb7a6007df1e3fcd8e4604bfa.tar.bz2
minetest-528908a4c3dd190cb7a6007df1e3fcd8e4604bfa.zip
Optimize entity-entity collision (#6587)
* Add IrrLicht type aliases * Add hash for IrrLicht vector * Add object map
Diffstat (limited to 'src/serverenvironment.h')
-rw-r--r--src/serverenvironment.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/serverenvironment.h b/src/serverenvironment.h
index 225f788d9..05a68cb30 100644
--- a/src/serverenvironment.h
+++ b/src/serverenvironment.h
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "activeobject.h"
#include "environment.h"
#include "mapnode.h"
+#include "server/serveractiveobjectmap.h"
#include "settings.h"
#include "util/numeric.h"
#include <set>
@@ -193,8 +194,6 @@ enum ClearObjectsMode {
This is not thread-safe. Server uses an environment mutex.
*/
-typedef std::unordered_map<u16, ServerActiveObject *> ServerActiveObjectMap;
-
class ServerEnvironment : public Environment
{
public:
@@ -254,18 +253,7 @@ public:
*/
u16 addActiveObject(ServerActiveObject *object);
- /**
- * Verify if id is a free active object id
- * @param id
- * @return true if slot is free
- */
- bool isFreeServerActiveObjectId(u16 id) const;
-
- /**
- * Retrieve the first free ActiveObject ID
- * @return free activeobject ID or 0 if none was found
- */
- u16 getFreeServerActiveObjectId();
+ void updateActiveObject(ServerActiveObject *object);
/*
Add an active object as a static object to the corresponding