diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-29 18:14:14 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-29 18:14:14 +0200 |
commit | bcd9813accbe48949d40d107f5b15e83969630f7 (patch) | |
tree | 95fda1af9f3e7db8fcf56572935e1883fbdbe9bb | |
parent | 6d4cd2ea1acc07ad5a25a422f430fa1159a3e872 (diff) | |
download | minetest-bcd9813accbe48949d40d107f5b15e83969630f7.tar.gz minetest-bcd9813accbe48949d40d107f5b15e83969630f7.tar.bz2 minetest-bcd9813accbe48949d40d107f5b15e83969630f7.zip |
tuned expired mesh updating while drawing a bit
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/map.cpp | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp index b7a076c50..b86fbf09e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -985,7 +985,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) const s32 nightlength = 2; const s32 daytimelength = 4; s32 d = daylength; - s32 t = (((m_time_of_day.get()/* + 24000/d/2*/)%24000)/(24000/d)); + s32 t = (((m_time_of_day.get())%24000)/(24000/d)); u32 dr; if(t < nightlength/2 || t >= d - nightlength/2) dr = 350; diff --git a/src/map.cpp b/src/map.cpp index a3fe9922e..71d73b179 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -3179,9 +3179,14 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass) This has to be done with the mesh_mutex unlocked */ // Pretty random but this should work somewhat nicely - if(mesh_expired && mesh_update_count < 3 - && (d < faraway || mesh_update_count < 2 - || m_control.range_all)) + if(mesh_expired && ( + (mesh_update_count < 3 + && (d < faraway || mesh_update_count < 2) + ) + || + (m_control.range_all && mesh_update_count < 20) + ) + ) /*if(mesh_expired && mesh_update_count < 6 && (d < faraway || mesh_update_count < 3))*/ { |