From ade5f226a922a2a1354bbbbc45b4c69d8be24156 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 17 Dec 2024 18:44:43 -0800 Subject: [PATCH] Fix random selecting between patrolling & wander idle behavior --- .../entity/creature/impl/idle/IdleBehaviourFactory.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/games/stendhal/server/entity/creature/impl/idle/IdleBehaviourFactory.java b/src/games/stendhal/server/entity/creature/impl/idle/IdleBehaviourFactory.java index 3444b3c508..8063c39d1b 100644 --- a/src/games/stendhal/server/entity/creature/impl/idle/IdleBehaviourFactory.java +++ b/src/games/stendhal/server/entity/creature/impl/idle/IdleBehaviourFactory.java @@ -32,9 +32,10 @@ public static IdleBehaviour get(final Map 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")) {