diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 7e88e5562..5476aad0e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -940,7 +940,8 @@ void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket * u32 keyPressed = myplayer->keyPressed; // scaled by 80, so that pi can fit into a u8 u8 fov = clientMap->getCameraFov() * 80; - u8 wanted_range = std::ceil(clientMap->getControl().wanted_range / MAP_BLOCKSIZE); + u8 wanted_range = MYMIN(255, + std::ceil(clientMap->getControl().wanted_range / MAP_BLOCKSIZE)); v3s32 position(pf.X, pf.Y, pf.Z); v3s32 speed(sf.X, sf.Y, sf.Z); |