]> git.lizzy.rs Git - minetest.git/blobdiff - src/particles.h
Fix rendering glitches when far from the center of the map
[minetest.git] / src / particles.h
index 7c89a79bfd80afbacc594e9021292c68a3f4f8cd..101fc49ce145cb8cb5a0bd72f8e8315318ec6543 100644 (file)
@@ -67,19 +67,20 @@ class Particle : public scene::ISceneNode
        virtual void OnRegisterSceneNode();
        virtual void render();
 
-       void step(float dtime, ClientEnvironment &env);
+       void step(float dtime);
 
        bool get_expired ()
        { return m_expiration < m_time; }
 
 private:
-       void updateLight(ClientEnvironment &env);
+       void updateLight();
        void updateVertices();
 
        video::S3DVertex m_vertices[4];
        float m_time;
        float m_expiration;
 
+       ClientEnvironment *m_env;
        IGameDef *m_gamedef;
        core::aabbox3d<f32> m_box;
        core::aabbox3d<f32> m_collisionbox;
@@ -94,6 +95,7 @@ class Particle : public scene::ISceneNode
        u8 m_light;
        bool m_collisiondetection;
        bool m_vertical;
+       v3s16 m_camera_offset;
 };
 
 class ParticleSpawner
@@ -144,7 +146,7 @@ class ParticleSpawner
        bool m_vertical;
 };
 
-void allparticles_step (float dtime, ClientEnvironment &env);
+void allparticles_step (float dtime);
 void allparticlespawners_step (float dtime, ClientEnvironment &env);
 
 void delete_particlespawner (u32 id);