diff --git a/doomsday/client/include/render/rend_particle.h b/doomsday/client/include/render/rend_particle.h index 1394031be0..edfcd33b6c 100644 --- a/doomsday/client/include/render/rend_particle.h +++ b/doomsday/client/include/render/rend_particle.h @@ -23,10 +23,6 @@ #include "world/p_particle.h" -#ifdef __cplusplus -extern "C" { -#endif - void Rend_ParticleRegister(void); /** @@ -68,8 +64,4 @@ void Rend_RenderParticles(void); */ void Rend_RenderGenerators(void); -#ifdef __cplusplus -} // extern "C" -#endif - #endif // LIBDENG_RENDER_PARTICLE_H diff --git a/doomsday/client/src/render/rend_particle.cpp b/doomsday/client/src/render/rend_particle.cpp index c9f0bb0343..e183b2cea2 100644 --- a/doomsday/client/src/render/rend_particle.cpp +++ b/doomsday/client/src/render/rend_particle.cpp @@ -230,7 +230,22 @@ void Rend_ParticleReleaseExtraTextures() void Rend_ParticleInitForNewFrame() { + // Which set of generators are we using for this frame? + if(App_World().hasMap()) + { + /** + * @todo If rendering multiple maps per frame, this would have to be + * set from the map rendering function. -jk + */ + gens = &App_World().map().generators(); + } + else + { + gens = 0; + } + if(!useParticles) return; + // Clear all visibility flags. de::zap(visiblePtcGens); } @@ -872,8 +887,6 @@ void Rend_RenderParticles() if(!useParticles) return; if(!App_World().hasMap()) return; - gens = &App_World().map().generators(); - // No visible particles at all? if(!listVisibleParticles()) return; @@ -957,8 +970,6 @@ void Rend_RenderGenerators() if(!devDrawGenerators) return; if(!App_World().hasMap()) return; - gens = &App_World().map().generators(); - glDisable(GL_DEPTH_TEST); float eye[3] = { vOrigin[VX], vOrigin[VZ], vOrigin[VY] };