Fix random selecting between patrolling & wander idle behavior

This commit is contained in:
Jordan Irwin 2024-12-17 18:44:43 -08:00
parent d19868ce10
commit bdfd0a1929
No known key found for this signature in database
GPG key ID: E3E358C2F44C290A

View file

@ -32,9 +32,10 @@ public class IdleBehaviourFactory {
} 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")) {