From: BlockMen Date: Fri, 20 Feb 2015 23:11:26 +0000 (+0100) Subject: Fix particles draworder X-Git-Tag: 0.4.13~576 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F2368%2Fhead;p=oweals%2Fminetest.git Fix particles draworder --- diff --git a/src/particles.cpp b/src/particles.cpp index 603e38cdd..a9e834826 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -71,6 +71,7 @@ Particle::Particle( m_material.setFlag(video::EMF_BACK_FACE_CULLING, false); m_material.setFlag(video::EMF_BILINEAR_FILTER, false); m_material.setFlag(video::EMF_FOG_ENABLE, true); + m_material.setFlag(video::EMF_ZWRITE_ENABLE, true); m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; m_material.setTexture(0, texture); m_texpos = texpos; @@ -119,8 +120,7 @@ void Particle::OnRegisterSceneNode() void Particle::render() { - // TODO: Render particles in front of water and the selectionbox - + SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); video::IVideoDriver* driver = SceneManager->getVideoDriver(); driver->setMaterial(m_material); driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);