diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-03-30 18:32:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 18:32:52 +0200 |
commit | ce873108aa91d19104f46c5acd3350385e7a4541 (patch) | |
tree | 58672a3c803469de71c9ae270beb9a052ba5559a /src/gamedef.h | |
parent | 2c490dddc037d7d1cf211bbf28309e31b0abdadd (diff) | |
download | minetest-ce873108aa91d19104f46c5acd3350385e7a4541.tar.gz minetest-ce873108aa91d19104f46c5acd3350385e7a4541.tar.bz2 minetest-ce873108aa91d19104f46c5acd3350385e7a4541.zip |
Client eventmanager refactor (#7179)
* Drop EventManager from GameDef & do some client cleanups
* EventManager is only used by Client. Don't expose it on Server & GameDef for nothing
* Drop Client::event() in favor of direct calls to getEventManager
* Cleanup some event put from new + put to put(new)
* MtEvent: add Type(u8) enum
* This will enhance event performance & ensure stricter type
* Drop MtEvent::checkIs (unused)
* clang-tidy reported fixes
* Code style
* Move event_manager.h to the client directory as it's only used by client
Add EventManager unittests + switch to unordered_map as order is not important here
Drop a unused function
Diffstat (limited to 'src/gamedef.h')
-rw-r--r-- | src/gamedef.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gamedef.h b/src/gamedef.h index f86eb13cd..bc0ee14c3 100644 --- a/src/gamedef.h +++ b/src/gamedef.h @@ -28,7 +28,6 @@ class NodeDefManager; class ICraftDefManager; class ITextureSource; class IShaderSource; -class MtEventManager; class IRollbackManager; class EmergeManager; class Camera; @@ -58,8 +57,6 @@ public: // Used for keeping track of names/ids of unknown nodes virtual u16 allocateUnknownNodeId(const std::string &name)=0; - virtual MtEventManager* getEventManager()=0; - // Only usable on the server, and NOT thread-safe. It is usable from the // environment thread. virtual IRollbackManager* getRollbackManager() { return NULL; } @@ -68,8 +65,6 @@ public: IItemDefManager *idef() { return getItemDefManager(); } const NodeDefManager *ndef() { return getNodeDefManager(); } ICraftDefManager *cdef() { return getCraftDefManager(); } - - MtEventManager *event() { return getEventManager(); } IRollbackManager *rollback() { return getRollbackManager(); } virtual const std::vector<ModSpec> &getMods() const = 0; |