tracker don't see npcs
This commit is contained in:
parent
c965c4d2c9
commit
86e758c057
1 changed files with 8 additions and 5 deletions
|
@ -73,6 +73,12 @@ impl TrackedState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub fn npc(&self) -> bool {
|
||||||
|
match self {
|
||||||
|
Vieux { color, .. } => *color != 1,
|
||||||
|
Conscrit { .. } => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
pub fn admin_color(&self) -> u8 {
|
pub fn admin_color(&self) -> u8 {
|
||||||
match self {
|
match self {
|
||||||
Vieux { color, invisible } => {
|
Vieux { color, invisible } => {
|
||||||
|
@ -218,12 +224,9 @@ pub fn apparent_info(
|
||||||
) -> Option<TrackedInfo> {
|
) -> Option<TrackedInfo> {
|
||||||
if watcher.id == team.id {
|
if watcher.id == team.id {
|
||||||
None
|
None
|
||||||
} else if let Conscrit {
|
} else if let Conscrit { captured, .. } = watcher.state {
|
||||||
captured, ..
|
|
||||||
} = watcher.state
|
|
||||||
{
|
|
||||||
if captured {
|
if captured {
|
||||||
if team.state.invisible() {
|
if team.state.invisible() || team.state.npc() {
|
||||||
None
|
None
|
||||||
} else if team.state.blurred() {
|
} else if team.state.blurred() {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
Loading…
Reference in a new issue