1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

set_fov: Add support for time-based transitions (#9705)

This commit is contained in:
ANAND
2020-05-02 16:22:11 +05:30
committed by GitHub
parent ac368af4fe
commit e0ea87f1f3
8 changed files with 123 additions and 34 deletions

View File

@@ -1892,10 +1892,10 @@ void Server::SendMovePlayer(session_t peer_id)
void Server::SendPlayerFov(session_t peer_id)
{
NetworkPacket pkt(TOCLIENT_FOV, 4 + 1, peer_id);
NetworkPacket pkt(TOCLIENT_FOV, 4 + 1 + 4, peer_id);
PlayerFovSpec fov_spec = m_env->getPlayer(peer_id)->getFov();
pkt << fov_spec.fov << fov_spec.is_multiplier;
pkt << fov_spec.fov << fov_spec.is_multiplier << fov_spec.transition_time;
Send(&pkt);
}