Skip to content

Commit

Permalink
Fix stupidness when sheep was scaried
Browse files Browse the repository at this point in the history
  • Loading branch information
rewin123 committed Dec 6, 2023
1 parent 0ed77b3 commit bc3a16a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sheep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ pub fn scared_sheeps(
let scare = IsScared::default();
sheep.2 .target_velocity = (sheep.1.translation - bark_origin).normalize_or_zero() * SHEEP_SPEED;
sheep.2 .target_velocity.y = 0.0; //sheep must not fly and be in fixed height
commands.entity(sheep.0).insert(scare);
commands.entity(sheep.0).insert(scare)
.remove::<RandomWalk>()
.remove::<IdleFeeding>();
*sheep.3 = Decision::Scared;


}
}
}
Expand Down

0 comments on commit bc3a16a

Please sign in to comment.