Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ pub enum BoxMode {
#[serde(default)]
pub struct PlayerConfig {
pub enabled: bool,
pub visiblity_check: bool,
pub esp_hotkey: KeyCode,
pub show_friendlies: bool,
pub draw_box: DrawMode,
Expand All @@ -237,6 +238,7 @@ impl Default for PlayerConfig {
fn default() -> Self {
Self {
enabled: true,
visiblity_check: false,
esp_hotkey: KeyCode::X,
show_friendlies: false,
draw_box: DrawMode::Color,
Expand Down
7 changes: 7 additions & 0 deletions src/ui/gui/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ impl App {
self.send_config();
}

if ui
.checkbox(&mut self.config.player.visiblity_check, "Visibility Check")
.changed()
{
self.send_config();
}

if keybind(
ui,
"esp_hotkey",
Expand Down
4 changes: 4 additions & 0 deletions src/ui/overlay/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ use crate::{

impl App {
pub fn draw_player(&self, painter: &Painter, player: &PlayerData, data: &Data) {
if self.config.player.visiblity_check && !player.visible {
return;
}

self.player_box(painter, player, data);
self.skeleton(painter, player, data);
}
Expand Down