Add chapter 2.10
This commit is contained in:
parent
f2f4c40c28
commit
a1ffc7b95d
@ -3,8 +3,8 @@ use specs::prelude::*;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
components::{Monster, Position, Viewshed, WantsToMelee},
|
components::{Monster, Position, Viewshed, WantsToMelee},
|
||||||
map::Map,
|
Confusion,
|
||||||
Confusion, RunState,
|
map::Map, RunState,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct MonsterAI {}
|
pub struct MonsterAI {}
|
||||||
@ -56,7 +56,7 @@ impl<'a> System<'a> for MonsterAI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !can_act {
|
if !can_act {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let distance =
|
let distance =
|
||||||
|
@ -21,7 +21,7 @@ impl<'a> System<'a> for VisibilitySystem {
|
|||||||
let (mut map, entities, mut viewshed, pos, player) = data;
|
let (mut map, entities, mut viewshed, pos, player) = data;
|
||||||
for (ent, viewshed, pos) in (&entities, &mut viewshed, &pos).join() {
|
for (ent, viewshed, pos) in (&entities, &mut viewshed, &pos).join() {
|
||||||
if !viewshed.dirty {
|
if !viewshed.dirty {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewshed.dirty = false;
|
viewshed.dirty = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user