diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-12-23 23:39:53 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-12-26 17:58:53 +0100 |
commit | d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d (patch) | |
tree | c2763ddfe026c2121864d6ca5eae640f01133f7e /src/ClientHandle.h | |
parent | Replace custom ChunkCoordinate with cChunkCoords (diff) | |
download | cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.gz cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.bz2 cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.lz cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.xz cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.zst cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.zip |
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r-- | src/ClientHandle.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h index fcad949f4..93864b002 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -50,12 +50,12 @@ class cClientHandle // tolua_export public: // tolua_export #if defined(ANDROID) - static const unsigned DEFAULT_VIEW_DISTANCE = 4; // The default ViewDistance (used when no value is set in Settings.ini) + static const int DEFAULT_VIEW_DISTANCE = 4; // The default ViewDistance (used when no value is set in Settings.ini) #else - static const unsigned DEFAULT_VIEW_DISTANCE = 10; + static const int DEFAULT_VIEW_DISTANCE = 10; #endif - static const unsigned MAX_VIEW_DISTANCE = 32; - static const unsigned MIN_VIEW_DISTANCE = 1; + static const int MAX_VIEW_DISTANCE = 32; + static const int MIN_VIEW_DISTANCE = 1; /** The percentage how much a block has to be broken. Should be a value between 0.7 (70% broken) and 1 (100% broken) depending on lag. @@ -63,7 +63,7 @@ public: // tolua_export static float FASTBREAK_PERCENTAGE; /** Creates a new client with the specified IP address in its description and the specified initial view distance. */ - cClientHandle(const AString & a_IPString, unsigned a_ViewDistance); + cClientHandle(const AString & a_IPString, int a_ViewDistance); virtual ~cClientHandle() override; @@ -242,13 +242,13 @@ public: // tolua_export inline short GetPing(void) const { return static_cast<short>(std::chrono::duration_cast<std::chrono::milliseconds>(m_Ping).count()); } /** Sets the maximal view distance. */ - void SetViewDistance(unsigned a_ViewDistance); + void SetViewDistance(int a_ViewDistance); /** Returns the view distance that the player currently have. */ - unsigned GetViewDistance(void) const { return m_CurrentViewDistance; } + int GetViewDistance(void) const { return m_CurrentViewDistance; } /** Returns the view distance that the player request, not the used view distance. */ - unsigned GetRequestedViewDistance(void) const { return m_RequestedViewDistance; } + int GetRequestedViewDistance(void) const { return m_RequestedViewDistance; } void SetLocale(const AString & a_Locale) { m_Locale = a_Locale; } AString GetLocale(void) const { return m_Locale; } @@ -422,10 +422,10 @@ private: AStringMap m_ForgeMods; /** The actual view distance used, the minimum of client's requested view distance and world's max view distance. */ - unsigned m_CurrentViewDistance; + int m_CurrentViewDistance; /** The requested view distance from the player. It isn't clamped with 1 and the max view distance of the world. */ - unsigned m_RequestedViewDistance; + int m_RequestedViewDistance; AString m_IPString; |