1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add support for per-player FOV overrides and multipliers

This commit is contained in:
Anand S 2018-07-15 05:56:30 +05:30 committed by sfan5
parent 5c9983400f
commit 47da640d77
13 changed files with 168 additions and 62 deletions

View file

@ -1765,6 +1765,16 @@ void Server::SendMovePlayer(session_t peer_id)
Send(&pkt);
}
void Server::SendPlayerFov(session_t peer_id)
{
NetworkPacket pkt(TOCLIENT_FOV, 4 + 1, peer_id);
PlayerFovSpec fov_spec = m_env->getPlayer(peer_id)->getFov();
pkt << fov_spec.fov << fov_spec.is_multiplier;
Send(&pkt);
}
void Server::SendLocalPlayerAnimations(session_t peer_id, v2s32 animation_frames[4],
f32 animation_speed)
{