mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Merge e4bc5fb900
into 2d36d32da8
This commit is contained in:
commit
b2cba79fcc
2 changed files with 4 additions and 4 deletions
|
@ -471,12 +471,12 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 tool_reload_ratio)
|
||||||
m_fov_transition_active = false;
|
m_fov_transition_active = false;
|
||||||
m_curr_fov_degrees = m_target_fov_degrees;
|
m_curr_fov_degrees = m_target_fov_degrees;
|
||||||
}
|
}
|
||||||
} else if (m_server_sent_fov) {
|
|
||||||
// Instantaneous FOV change
|
|
||||||
m_curr_fov_degrees = m_target_fov_degrees;
|
|
||||||
} else if (player->getPlayerControl().zoom && player->getZoomFOV() > 0.001f) {
|
} else if (player->getPlayerControl().zoom && player->getZoomFOV() > 0.001f) {
|
||||||
// Player requests zoom, apply zoom FOV
|
// Player requests zoom, apply zoom FOV
|
||||||
m_curr_fov_degrees = player->getZoomFOV();
|
m_curr_fov_degrees = player->getZoomFOV();
|
||||||
|
} else if (m_server_sent_fov) {
|
||||||
|
// Instantaneous FOV change
|
||||||
|
m_curr_fov_degrees = m_target_fov_degrees;
|
||||||
} else {
|
} else {
|
||||||
// Set to client's selected FOV
|
// Set to client's selected FOV
|
||||||
m_curr_fov_degrees = m_cache_fov;
|
m_curr_fov_degrees = m_cache_fov;
|
||||||
|
|
|
@ -2420,7 +2420,7 @@ void Game::toggleFullViewRange()
|
||||||
void Game::checkZoomEnabled()
|
void Game::checkZoomEnabled()
|
||||||
{
|
{
|
||||||
LocalPlayer *player = client->getEnv().getLocalPlayer();
|
LocalPlayer *player = client->getEnv().getLocalPlayer();
|
||||||
if (player->getZoomFOV() < 0.001f || player->getFov().fov > 0.0f)
|
if (player->getZoomFOV() < 0.001f)
|
||||||
m_game_ui->showTranslatedStatusText("Zoom currently disabled by game or mod");
|
m_game_ui->showTranslatedStatusText("Zoom currently disabled by game or mod");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue