mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
View range: Set maximum to 4000 nodes
The network protocol does not support larger than 255 mapblocks.
This commit is contained in:
parent
38abc91802
commit
02112f84e2
4 changed files with 20 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue