aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2015-02-21 00:11:26 +0100
committerBlockMen <nmuelll@web.de>2015-02-21 14:11:00 +0100
commitc09d026f0561ee3c6db821a7e193716f724a0e4a (patch)
tree20a4bb270a6f0003d6ccd86cca3b9e53e2b76e14
parent3998a1f8f98c9d95a4b91b7a95612c6313081279 (diff)
downloadminetest-c09d026f0561ee3c6db821a7e193716f724a0e4a.tar.gz
minetest-c09d026f0561ee3c6db821a7e193716f724a0e4a.tar.bz2
minetest-c09d026f0561ee3c6db821a7e193716f724a0e4a.zip
Fix particles draworder
-rw-r--r--src/particles.cpp4
1 files changed, 2 insertions, 2 deletions
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);