mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow zoom even with overwritten default FOV
This commit is contained in:
parent
1a045da0dd
commit
e4bc5fb900
2 changed files with 4 additions and 4 deletions
|
@ -494,12 +494,12 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 tool_reload_ratio)
|
|||
m_fov_transition_active = false;
|
||||
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) {
|
||||
// Player requests zoom, apply zoom FOV
|
||||
m_curr_fov_degrees = player->getZoomFOV();
|
||||
} else if (m_server_sent_fov) {
|
||||
// Instantaneous FOV change
|
||||
m_curr_fov_degrees = m_target_fov_degrees;
|
||||
} else {
|
||||
// Set to client's selected FOV
|
||||
m_curr_fov_degrees = m_cache_fov;
|
||||
|
|
|
@ -2502,7 +2502,7 @@ void Game::toggleFullViewRange()
|
|||
void Game::checkZoomEnabled()
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue