mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better enemy AI targetting and combat
This commit is contained in:
parent
8ef1532902
commit
ee0eb8d53c
@ -108,7 +108,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
let entities = (&entities, &positions, &stats)
|
let entities = (&entities, &positions, &stats)
|
||||||
.join()
|
.join()
|
||||||
.filter(|(e, e_pos, e_stats)| {
|
.filter(|(e, e_pos, e_stats)| {
|
||||||
Vec2::<f32>::from(e_pos.0 - pos.0).magnitude() < SIGHT_DIST
|
(e_pos.0 - pos.0).magnitude() < SIGHT_DIST
|
||||||
&& *e != entity
|
&& *e != entity
|
||||||
&& !e_stats.is_dead
|
&& !e_stats.is_dead
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user