summaryrefslogtreecommitdiff
path: root/src/clouds.cpp
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/clouds.cpp
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/clouds.cpp')
-rw-r--r--src/clouds.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clouds.cpp b/src/clouds.cpp
index 55ec8965a..1bf6dc9c1 100644
--- a/src/clouds.cpp
+++ b/src/clouds.cpp
@@ -35,7 +35,8 @@ Clouds::Clouds(
scene::ISceneNode(parent, mgr, id),
m_seed(seed),
m_camera_pos(0,0),
- m_time(0)
+ m_time(0),
+ m_camera_offset(0,0,0)
{
m_material.setFlag(video::EMF_LIGHTING, false);
//m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);
@@ -318,6 +319,7 @@ void Clouds::render()
}
v3f pos(p0.X, m_cloud_y, p0.Y);
+ pos -= intToFloat(m_camera_offset, BS);
for(u16 i=0; i<4; i++)
v[i].Pos += pos;