1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
This commit is contained in:
SmallJoker 2025-06-27 11:45:37 +00:00 committed by GitHub
commit b2cba79fcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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");
} }