feat: removed reticle from HUD
This commit is contained in:
parent
5277ac6281
commit
2c95d2e7aa
3 changed files with 0 additions and 21 deletions
|
|
@ -1,6 +1,5 @@
|
|||
#include "rifle.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "wave_survival/heads_up_display.h"
|
||||
#include "wave_survival/hitscan_muzzle.h"
|
||||
#include "wave_survival/macros.h"
|
||||
#include "wave_survival/player_body.h"
|
||||
|
|
@ -88,14 +87,9 @@ void Rifle::on_animation_changed(String new_animation) {
|
|||
if (new_animation == "aim") {
|
||||
this->in_alt_mode = true;
|
||||
this->fov = this->ads_factor;
|
||||
HeadsUpDisplay::get_singleton()->set_reticle_visibility(false);
|
||||
} else if (new_animation == "hip") {
|
||||
this->in_alt_mode = false;
|
||||
this->fov = 1.0;
|
||||
HeadsUpDisplay::get_singleton()->set_reticle_visibility(true);
|
||||
}
|
||||
if (new_animation == "reload") {
|
||||
HeadsUpDisplay::get_singleton()->set_reticle_visibility(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -182,9 +176,6 @@ void Rifle::notify_deselected() {
|
|||
get_input()->disconnect(PlayerInput::sig_alt_mode, callable_mp(this, &self_type::on_alt_mode));
|
||||
get_input()->disconnect(PlayerInput::sig_reload, callable_mp(this, &self_type::on_reload));
|
||||
this->running = false;
|
||||
if (HeadsUpDisplay * hud{ HeadsUpDisplay::get_singleton() }) {
|
||||
hud->set_reticle_visibility(true);
|
||||
}
|
||||
this->in_alt_mode = false;
|
||||
this->fov = 1.f;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue