From d246cdd5115816cf19f721d87db103917522e63d Mon Sep 17 00:00:00 2001 From: bash <31279994+hermensbas@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:26:18 +0100 Subject: [PATCH] [performance] server_and_bot_init_phase_patch2 (#653) --- src/PlayerbotAI.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 6a36ed24..cc84034c 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4254,7 +4254,7 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) } // Bots do not need to move using PathGenerator. - if (activityType == DETAILED_MOVE_ACTIVITY) return false; + //if (activityType == DETAILED_MOVE_ACTIVITY) return false; // All exceptions are now done, below is the code to have a specified % of bots // active at all times. The default is 10%. With 0.1% of all bots going active @@ -4307,21 +4307,18 @@ uint32 PlayerbotAI::SmartScaleActivity(ActivePiorityType type, uint32 botActiveA case ActivePiorityType::PLAYER_FRIEND: case ActivePiorityType::PLAYER_GUILD: case ActivePiorityType::IN_ACTIVE_MAP: - if (maxDiff > 200) return 10; - if (maxDiff > 150) return 25; + if (maxDiff > 200) return 25; if (maxDiff > 100) return 50; if (maxDiff > 50) return 80; break; case ActivePiorityType::IN_VERY_ACTIVE_AREA: // Many bots nearby. Do not do heavy area checks. case ActivePiorityType::IN_NOT_ACTIVE_MAP: - if (maxDiff > 100) return 10; - if (maxDiff > 50) return 25; - else return 30; + if (maxDiff > 100) return 25; + if (maxDiff > 50) return 50; case ActivePiorityType::IN_EMPTY_SERVER: - return 10; + return 25; default: - if (maxDiff > 200) return 10; - if (maxDiff > 150) return 25; + if (maxDiff > 200) return 25; if (maxDiff > 100) return 50; break; }