Skip to content

Commit

Permalink
Fix random selecting between patrolling & wander idle behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Dec 18, 2024
1 parent d2f5493 commit ade5f22
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ public static IdleBehaviour get(final Map<String, String> aiProfiles) {
} else {
behaviour = new WanderIdleBehaviour();
}
} else if (aiProfiles.containsKey("patrolling") && aiProfiles.containsKey("wander")) {
// randomly select between "patrolling" & "wander" for individual entity instance
behaviour = Rand.flipCoin() ? new Patroller() : behaviour;
if (aiProfiles.containsKey("patrolling")) {
// randomly select between "patrolling" & "wander" for individual entity instance
behaviour = Rand.flipCoin() ? new Patroller() : behaviour;
}
} else if (aiProfiles.containsKey("patrolling")) {
behaviour = new Patroller();
} else if (aiProfiles.containsKey("camouflage")) {
Expand Down

0 comments on commit ade5f22

Please sign in to comment.