Compare commits
3 commits
67d59a161d
...
569ac1f712
Author | SHA1 | Date | |
---|---|---|---|
![]() |
569ac1f712 | ||
![]() |
efff355479 | ||
![]() |
a55fe18a6c |
|
@ -30,7 +30,7 @@ void PlayerBody::on_child_entered(Node *node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerBody::process(double delta) {
|
void PlayerBody::process(double delta) {
|
||||||
float const target_fov{ get_is_running() ? 1.25f : 1.0f };
|
float const target_fov{ get_is_running() ? 1.1f : 1.0f };
|
||||||
fov = Math::move_toward(fov, target_fov, float(delta * 2.0));
|
fov = Math::move_toward(fov, target_fov, float(delta * 2.0));
|
||||||
this->camera->set_fov_factor(fov);
|
this->camera->set_fov_factor(fov);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ void PlayerCamera::on_look_input(Vector2 input) {
|
||||||
|
|
||||||
void PlayerCamera::update_fov() {
|
void PlayerCamera::update_fov() {
|
||||||
if (!Engine::get_singleton()->is_editor_hint() && is_ready()) {
|
if (!Engine::get_singleton()->is_editor_hint() && is_ready()) {
|
||||||
set_fov(this->base_fov * this->fov_factor);
|
set_fov(CLAMP(this->base_fov * this->fov_factor, 1, 179));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ void Rifle::notify_deselected() {
|
||||||
hud->set_reticle_visibility(true);
|
hud->set_reticle_visibility(true);
|
||||||
}
|
}
|
||||||
this->in_alt_mode = false;
|
this->in_alt_mode = false;
|
||||||
this->fov = 0.f;
|
this->fov = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rifle::reload_full() {
|
void Rifle::reload_full() {
|
||||||
|
|
Loading…
Reference in a new issue