diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-10-30 21:24:10 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-10-30 21:24:10 +0100 |
commit | 9c7661f50f82fe265836f3279bf20b15aebba5b3 (patch) | |
tree | 85d4deca92d7159d94f9cacb40e0a62cb118b240 /src/ClientHandle.cpp | |
parent | Merge pull request #1576 from mc-server/QtBiomeVisualiserThreadedGen (diff) | |
download | cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar.gz cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar.bz2 cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar.lz cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar.xz cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.tar.zst cuberite-9c7661f50f82fe265836f3279bf20b15aebba5b3.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index faee05450..9b3bd9545 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -2847,7 +2847,9 @@ void cClientHandle::SetUsername( const AString & a_Username) void cClientHandle::SetViewDistance(int a_ViewDistance) { - m_ViewDistance = Clamp(a_ViewDistance, MIN_VIEW_DISTANCE, MAX_VIEW_DISTANCE); + ASSERT(m_Player->GetWorld() == NULL); + + m_ViewDistance = Clamp(a_ViewDistance, cClientHandle::MIN_VIEW_DISTANCE, m_Player->GetWorld()->GetMaxViewDistance()); LOGD("Setted %s's view distance to %i", GetUsername().c_str(), m_ViewDistance); } |