From c909a2cb4314288dab9fa7d1afa6d540c9d519da Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Tue, 6 Jul 2021 17:16:20 -0400 Subject: [PATCH] Remove guard debug NPC chats (like "I'm a guard"). --- server/src/sys/agent.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index db0be5d5c9..14a09e7a5c 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1372,18 +1372,6 @@ impl<'a> AgentData<'a> { ) { agent.action_state.timer = 0.0; - // Search area - // TODO: REMOVE THIS BEFORE MERGE - //if let Some(agent_stats) = read_data.stats.get(*self.entity) { - // let is_village_guard = agent_stats.name == *"Guard".to_string(); - // if is_village_guard { - // self.chat_general( - // "I am a guard, searching for target".to_string(), - // event_emitter, - // ); - // } - //} - let target = self.cached_spatial_grid.0 .in_circle_aabr(self.pos.0.xy(), SEARCH_DIST) .filter_map(|entity| { @@ -1462,15 +1450,6 @@ impl<'a> AgentData<'a> { }) // Can we even see them? .filter(|(_e, e_pos)| { - // TODO: REMOVE THIS BEFORE MERGE - //if let Some(agent_stats) = read_data.stats.get(*self.entity) { - // let is_village_guard = agent_stats.name == *"Guard".to_string(); - // if is_village_guard { - // println!("looking at: {:?} at {:?}", _e, e_pos); - // println!("can we see them: {:?}", read_data.terrain.ray(self.pos.0 + Vec3::unit_z(), e_pos.0 + Vec3::unit_z()).until(Block::is_opaque).cast().0 >= e_pos.0.distance(self.pos.0)); - // } - //} - read_data.terrain .ray(self.pos.0 + Vec3::unit_z(), e_pos.0 + Vec3::unit_z()) .until(Block::is_opaque) @@ -1489,15 +1468,6 @@ impl<'a> AgentData<'a> { hostile: true, selected_at: read_data.time.0, }); - - // TODO: REMOVE THIS BEFORE MERGE - if let Some(agent_stats) = read_data.stats.get(*self.entity) { - let is_village_guard = agent_stats.name == *"Guard".to_string(); - if is_village_guard { - let msg = "I'm a guard".to_string(); - self.chat_general(msg, event_emitter); - } - } } fn attack(