forked from Mirrorlandia_minetest/minetest
master #1
@ -1034,9 +1034,9 @@ void writePlayerPos(LocalPlayer *myplayer, ClientMap *clientMap, NetworkPacket *
|
|||||||
s32 yaw = myplayer->getYaw() * 100;
|
s32 yaw = myplayer->getYaw() * 100;
|
||||||
u32 keyPressed = myplayer->control.getKeysPressed();
|
u32 keyPressed = myplayer->control.getKeysPressed();
|
||||||
// scaled by 80, so that pi can fit into a u8
|
// scaled by 80, so that pi can fit into a u8
|
||||||
u8 fov = clientMap->getCameraFov() * 80;
|
u8 fov = std::fmin(255.0f, clientMap->getCameraFov() * 80.0f);
|
||||||
u8 wanted_range = MYMIN(255,
|
u8 wanted_range = std::fmin(255.0f,
|
||||||
std::ceil(clientMap->getControl().wanted_range / MAP_BLOCKSIZE));
|
std::ceil(clientMap->getWantedRange() * (1.0f / MAP_BLOCKSIZE)));
|
||||||
|
|
||||||
v3s32 position(pf.X, pf.Y, pf.Z);
|
v3s32 position(pf.X, pf.Y, pf.Z);
|
||||||
v3s32 speed(sf.X, sf.Y, sf.Z);
|
v3s32 speed(sf.X, sf.Y, sf.Z);
|
||||||
@ -1385,8 +1385,9 @@ void Client::sendPlayerPos()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ClientMap &map = m_env.getClientMap();
|
ClientMap &map = m_env.getClientMap();
|
||||||
u8 camera_fov = map.getCameraFov();
|
u8 camera_fov = std::fmin(255.0f, map.getCameraFov() * 80.0f);
|
||||||
u8 wanted_range = map.getControl().wanted_range;
|
u8 wanted_range = std::fmin(255.0f,
|
||||||
|
std::ceil(map.getWantedRange() * (1.0f / MAP_BLOCKSIZE)));
|
||||||
|
|
||||||
u32 keyPressed = player->control.getKeysPressed();
|
u32 keyPressed = player->control.getKeysPressed();
|
||||||
bool camera_inverted = m_camera->getCameraMode() == CAMERA_MODE_THIRD_FRONT;
|
bool camera_inverted = m_camera->getCameraMode() == CAMERA_MODE_THIRD_FRONT;
|
||||||
|
Loading…
Reference in New Issue
Block a user