Browse Source

Use sight radius as search radius

master
Graham Northup 6 months ago
parent
commit
5ac02e76b3
  1. 2
      src/ent.rs

2
src/ent.rs

@ -31,7 +31,7 @@ macro_rules! make_entity {
make_entity!(Prowler, {}, {
fn act<'w>(&mut self, obs: &Observation<'w>) -> Action {
violence_toward(self.pos, obs, |ent| ent.borrow().class() & ECLS_PROTAG != 0, |ent| ent.borrow().best_damage())
violence_toward(self.pos, Some(self.sight()), obs, |ent| ent.borrow().class() & ECLS_PROTAG != 0, |ent| ent.borrow().best_damage())
}
});

Loading…
Cancel
Save