summaryrefslogtreecommitdiff
path: root/src/clientiface.h
diff options
context:
space:
mode:
authorLars <larsh@apache.org>2020-10-21 14:46:04 -0700
committerlhofhansl <larsh@apache.org>2020-10-27 12:08:44 -0700
commit68cd93b8657c0c8cad0196e79fb63e3275322e38 (patch)
tree36f3f84e989fb2d818a2d3547815081bd2d010c7 /src/clientiface.h
parent61a196378ff91411af3245504c5861da026b3b25 (diff)
downloadminetest-68cd93b8657c0c8cad0196e79fb63e3275322e38.tar.gz
minetest-68cd93b8657c0c8cad0196e79fb63e3275322e38.tar.bz2
minetest-68cd93b8657c0c8cad0196e79fb63e3275322e38.zip
Avoid resending near blocks unnecessarily.
Diffstat (limited to 'src/clientiface.h')
-rw-r--r--src/clientiface.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clientiface.h b/src/clientiface.h
index ca2af65fe..eabffb0b6 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -364,6 +364,7 @@ private:
std::set<v3s16> m_blocks_sent;
s16 m_nearest_unsent_d = 0;
v3s16 m_last_center;
+ v3f m_last_camera_dir;
const u16 m_max_simul_sends;
const float m_min_time_from_building;
@@ -383,10 +384,10 @@ private:
std::map<v3s16, float> m_blocks_sending;
/*
- Blocks that have been modified since last sending them.
- These blocks will not be marked as sent, even if the
- client reports it has received them to account for blocks
- that are being modified while on the line.
+ Blocks that have been modified since blocks were
+ sent to the client last (getNextBlocks()).
+ This is used to reset the unsent distance, so that
+ modified blocks are resent to the client.
List of block positions.
*/