diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-02-01 03:06:02 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-02-01 03:06:02 +0200 |
commit | 6e196c2ce4285c0aea2a5c714e842d90c1b84b43 (patch) | |
tree | e1c25414910ed344ced69125ba4f8170dc27bc9f /src/irrlichtwrapper.cpp | |
parent | be851871cd43316d12fd9a5f2cc6dec98a1c9ce0 (diff) | |
download | minetest-6e196c2ce4285c0aea2a5c714e842d90c1b84b43.tar.gz minetest-6e196c2ce4285c0aea2a5c714e842d90c1b84b43.tar.bz2 minetest-6e196c2ce4285c0aea2a5c714e842d90c1b84b43.zip |
partly working chunk-based map generator (doesn't save properly, spawn is pretty random)
Diffstat (limited to 'src/irrlichtwrapper.cpp')
-rw-r--r-- | src/irrlichtwrapper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/irrlichtwrapper.cpp b/src/irrlichtwrapper.cpp index e5cab98c6..a1d37f4bd 100644 --- a/src/irrlichtwrapper.cpp +++ b/src/irrlichtwrapper.cpp @@ -5,6 +5,7 @@ IrrlichtWrapper::IrrlichtWrapper(IrrlichtDevice *device) { + m_running = true; m_main_thread = get_current_thread_id(); m_device_mutex.Init(); m_device = device; @@ -35,6 +36,11 @@ void IrrlichtWrapper::Run() } } +void IrrlichtWrapper::Shutdown(bool shutdown) +{ + m_running = !shutdown; +} + textureid_t IrrlichtWrapper::getTextureId(const std::string &name) { u32 id = m_namecache.getId(name); @@ -73,6 +79,10 @@ video::ITexture* IrrlichtWrapper::getTexture(const TextureSpec &spec) } else { + // If irrlicht has shut down, just return NULL + if(m_running == false) + return NULL; + // We're gonna ask the result to be put into here ResultQueue<TextureSpec, video::ITexture*, u8, u8> result_queue; |