mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow setting custom third person front view camera offset (#13686)
Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
3a4bf14c20
commit
33cc29bbda
9 changed files with 41 additions and 22 deletions
|
@ -1981,10 +1981,10 @@ void Server::SendLocalPlayerAnimations(session_t peer_id, v2s32 animation_frames
|
|||
Send(&pkt);
|
||||
}
|
||||
|
||||
void Server::SendEyeOffset(session_t peer_id, v3f first, v3f third)
|
||||
void Server::SendEyeOffset(session_t peer_id, v3f first, v3f third, v3f third_front)
|
||||
{
|
||||
NetworkPacket pkt(TOCLIENT_EYE_OFFSET, 0, peer_id);
|
||||
pkt << first << third;
|
||||
pkt << first << third << third_front;
|
||||
Send(&pkt);
|
||||
}
|
||||
|
||||
|
@ -3405,12 +3405,13 @@ void Server::setLocalPlayerAnimations(RemotePlayer *player,
|
|||
SendLocalPlayerAnimations(player->getPeerId(), animation_frames, frame_speed);
|
||||
}
|
||||
|
||||
void Server::setPlayerEyeOffset(RemotePlayer *player, const v3f &first, const v3f &third)
|
||||
void Server::setPlayerEyeOffset(RemotePlayer *player, const v3f &first, const v3f &third, const v3f &third_front)
|
||||
{
|
||||
sanity_check(player);
|
||||
player->eye_offset_first = first;
|
||||
player->eye_offset_third = third;
|
||||
SendEyeOffset(player->getPeerId(), first, third);
|
||||
player->eye_offset_third_front = third_front;
|
||||
SendEyeOffset(player->getPeerId(), first, third, third_front);
|
||||
}
|
||||
|
||||
void Server::setSky(RemotePlayer *player, const SkyboxParams ¶ms)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue