summaryrefslogtreecommitdiff
path: root/src/particles.h
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2014-01-26 11:40:21 +0100
committerNovatux <nathanael.courant@laposte.net>2014-03-04 20:12:10 +0100
commit062de11b4cff30861dd4e9eb56f131d821f34b51 (patch)
tree37bdcbacb355abfe1f8091307222e430e58b78d8 /src/particles.h
parent8e15179e7d896851c6f5814fc6524c86b26ce2e3 (diff)
downloadminetest-062de11b4cff30861dd4e9eb56f131d821f34b51.tar.gz
minetest-062de11b4cff30861dd4e9eb56f131d821f34b51.tar.bz2
minetest-062de11b4cff30861dd4e9eb56f131d821f34b51.zip
Fix rendering glitches when far from the center of the map
Diffstat (limited to 'src/particles.h')
-rw-r--r--src/particles.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/particles.h b/src/particles.h
index 7c89a79bf..101fc49ce 100644
--- a/src/particles.h
+++ b/src/particles.h
@@ -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 @@ private:
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);