Add chapter 2.10

This commit is contained in:
Kasper Juul Hermansen 2022-01-27 20:14:25 +01:00
parent f2f4c40c28
commit a1ffc7b95d
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
2 changed files with 5 additions and 5 deletions

View File

@ -3,8 +3,8 @@ use specs::prelude::*;
use crate::{
components::{Monster, Position, Viewshed, WantsToMelee},
map::Map,
Confusion, RunState,
Confusion,
map::Map, RunState,
};
pub struct MonsterAI {}
@ -56,7 +56,7 @@ impl<'a> System<'a> for MonsterAI {
}
if !can_act {
return;
continue;
}
let distance =

View File

@ -21,7 +21,7 @@ impl<'a> System<'a> for VisibilitySystem {
let (mut map, entities, mut viewshed, pos, player) = data;
for (ent, viewshed, pos) in (&entities, &mut viewshed, &pos).join() {
if !viewshed.dirty {
return;
continue;
}
viewshed.dirty = false;