aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-23 20:23:03 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-24 04:24:26 +0200
commit6c14025b2d416105915440e114de927c26e925ac (patch)
tree64396513416935f2c0eaf50115a61856bbc0f7f2 /src/server.cpp
parente53794868eaa33199a1f1011b2d5f517b6f68057 (diff)
downloadminetest-6c14025b2d416105915440e114de927c26e925ac.tar.gz
minetest-6c14025b2d416105915440e114de927c26e925ac.tar.bz2
minetest-6c14025b2d416105915440e114de927c26e925ac.zip
Add event manager and use it to trigger sounds
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp
index d762f2688..e781f1284 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -50,6 +50,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "tool.h"
#include "utility_string.h"
#include "sound.h" // dummySoundManager
+#include "event_manager.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@@ -853,6 +854,7 @@ Server::Server(
m_itemdef(createItemDefManager()),
m_nodedef(createNodeDefManager()),
m_craftdef(createCraftDefManager()),
+ m_event(new EventManager()),
m_thread(this),
m_emergethread(this),
m_time_of_day_send_timer(0),
@@ -1064,10 +1066,10 @@ Server::~Server()
delete i.getNode()->getValue();
}
}
-
- // Delete Environment
+
+ // Delete things in the reverse order of creation
delete m_env;
-
+ delete m_event;
delete m_itemdef;
delete m_nodedef;
delete m_craftdef;
@@ -4275,6 +4277,10 @@ ISoundManager* Server::getSoundManager()
{
return &dummySoundManager;
}
+MtEventManager* Server::getEventManager()
+{
+ return m_event;
+}
IWritableItemDefManager* Server::getWritableItemDefManager()
{