tuned expired mesh updating while drawing a bit
authorPerttu Ahola <celeron55@gmail.com>
Wed, 29 Dec 2010 16:14:14 +0000 (18:14 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Wed, 29 Dec 2010 16:14:14 +0000 (18:14 +0200)
src/client.cpp
src/map.cpp

index b7a076c5054b9061d4ebd39b08947fc6d24e88ba..b86fbf09e41e332107fae4f2e6be4baf94ee208c 100644 (file)
@@ -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;
index a3fe9922ef7600bc4c525e682827bc8e75ee7fbb..71d73b1794d7e8fc75c38d87460dae043f886e7f 100644 (file)
@@ -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))*/
                        {