diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-23 23:51:03 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-23 23:51:03 +0100 |
commit | bf19f7ae9ceacf9e6a65e097be443ae3f5c85232 (patch) | |
tree | 339caeecf7ad34b10c24310dd74dadccbeeed3a9 /source/cClientHandle.h | |
parent | Plain pointer cChunkPtr finishing touches; removed cChunk's critical sections (diff) | |
download | cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar.gz cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar.bz2 cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar.lz cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar.xz cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.tar.zst cuberite-bf19f7ae9ceacf9e6a65e097be443ae3f5c85232.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cClientHandle.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/cClientHandle.h b/source/cClientHandle.h index ffe25db2b..6b567a88b 100644 --- a/source/cClientHandle.h +++ b/source/cClientHandle.h @@ -65,8 +65,12 @@ public: };
static const int MAXBLOCKCHANGEINTERACTIONS = 10; // 5 didn't help, 10 seems to have done the trick
+
+ static const int DEFAULT_VIEW_DISTANCE = 9; // The default ViewDistance (used when no value is set in Settings.ini)
+ static const int MAX_VIEW_DISTANCE = 10;
+ static const int MIN_VIEW_DISTANCE = 4;
- cClientHandle(const cSocket & a_Socket);
+ cClientHandle(const cSocket & a_Socket, int a_ViewDistance);
~cClientHandle();
const cSocket & GetSocket(void) const {return m_Socket; }
@@ -99,11 +103,14 @@ public: const AString & GetUsername(void) const;
inline short GetPing() { return m_Ping; }
+
+ void SetViewDistance(int a_ViewDistance);
private:
- static const int VIEWDISTANCE = 4; // Number of chunks the player can see in each direction; 4 is the minimum ( http://wiki.vg/Protocol_FAQ#.E2.80.A6all_connecting_clients_spasm_and_jerk_uncontrollably.21 )
- static const int GENERATEDISTANCE = 1; // Server generates this many chunks AHEAD of player sight.
+ int m_ViewDistance; // Number of chunks the player can see in each direction; 4 is the minimum ( http://wiki.vg/Protocol_FAQ#.E2.80.A6all_connecting_clients_spasm_and_jerk_uncontrollably.21 )
+
+ static const int GENERATEDISTANCE = 2; // Server generates this many chunks AHEAD of player sight. 2 is the minimum, since foliage is generated 1 step behind chunk terrain generation
int m_ProtocolVersion;
AString m_Username;
|