1
0

Renamed m_SetViewDistance to m_RequestedViewDistance

This commit is contained in:
Howaner 2014-11-15 15:33:42 +01:00
parent 8c3c11d6b3
commit 927d8d7702
2 changed files with 7 additions and 7 deletions

View File

@ -66,7 +66,7 @@ int cClientHandle::s_ClientCount = 0;
cClientHandle::cClientHandle(const cSocket * a_Socket, int a_ViewDistance) :
m_UsedViewDistance(a_ViewDistance),
m_SetViewDistance(a_ViewDistance),
m_RequestedViewDistance(a_ViewDistance),
m_IPString(a_Socket->GetIPString()),
m_OutgoingData(64 KiB),
m_Player(nullptr),
@ -2850,9 +2850,9 @@ void cClientHandle::SetViewDistance(int a_ViewDistance)
{
ASSERT(m_Player->GetWorld() == NULL);
m_SetViewDistance = a_ViewDistance;
m_UsedViewDistance = Clamp(m_SetViewDistance, cClientHandle::MIN_VIEW_DISTANCE, m_Player->GetWorld()->GetMaxViewDistance());
LOGD("Setted view distance from %s to %i!", GetUsername().c_str(), m_UsedViewDistance);
m_RequestedViewDistance = a_ViewDistance;
m_UsedViewDistance = Clamp(a_ViewDistance, cClientHandle::MIN_VIEW_DISTANCE, m_Player->GetWorld()->GetMaxViewDistance());
LOGD("Setted view distance from %s to %d!", GetUsername().c_str(), m_UsedViewDistance);
}

View File

@ -224,7 +224,7 @@ public:
int GetViewDistance(void) const { return m_UsedViewDistance; }
/** Returns the view distance that the player request, not the used view distance. */
int GetRequestedViewDistance(void) const { return m_SetViewDistance; }
int GetRequestedViewDistance(void) const { return m_RequestedViewDistance; }
void SetLocale(AString & a_Locale) { m_Locale = a_Locale; }
AString GetLocale(void) const { return m_Locale; }
@ -342,8 +342,8 @@ private:
/** Number of chunks the player can see in each direction */
int m_UsedViewDistance;
/** The original view distance from the player. It isn't clamped with 1 and the max view distance of the world. */
int m_SetViewDistance;
/** The requested view distance from the player. It isn't clamped with 1 and the max view distance of the world. */
int m_RequestedViewDistance;
AString m_IPString;