1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix rendering glitches when far from the center of the map

This commit is contained in:
Novatux 2014-01-26 11:40:21 +01:00
parent 8e15179e7d
commit 062de11b4c
17 changed files with 112 additions and 35 deletions

View file

@ -175,6 +175,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
v3f camera_position = m_camera_position;
v3f camera_direction = m_camera_direction;
f32 camera_fov = m_camera_fov;
v3s16 camera_offset = m_camera_offset;
m_camera_mutex.Unlock();
// Use a higher fov to accomodate faster camera movements.
@ -250,6 +251,9 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
if not seen on display
*/
if (block->mesh != NULL)
block->mesh->updateCameraOffset(m_camera_offset);
float range = 100000 * BS;
if(m_control.range_all == false)
range = m_control.wanted_range * BS;