mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Autoscale latency modifier
This commit is contained in:
@@ -292,12 +292,8 @@ void RandomPlayerbotMgr::UpdateAIInternal(uint32 elapsed, bool /*minimal*/)
|
||||
if (!sPlayerbotAIConfig->randomBotAutologin || !sPlayerbotAIConfig->enabled)
|
||||
return;
|
||||
|
||||
if (sPlayerbotAIConfig->enablePrototypePerformanceDiff)
|
||||
if (sPlayerbotAIConfig->botActiveAloneSmartScale)
|
||||
{
|
||||
LOG_INFO("playerbots", "---------------------------------------");
|
||||
LOG_INFO("playerbots",
|
||||
"PROTOTYPE: Playerbot performance enhancements are active. Issues and instability may occur.");
|
||||
LOG_INFO("playerbots", "---------------------------------------");
|
||||
ScaleBotActivity();
|
||||
}
|
||||
|
||||
@@ -414,8 +410,9 @@ void RandomPlayerbotMgr::ScaleBotActivity()
|
||||
// max/min activity
|
||||
|
||||
// % increase/decrease wanted diff , avg diff
|
||||
float activityPercentageMod = pid.calculate(
|
||||
sRandomPlayerbotMgr->GetPlayers().empty() ? sPlayerbotAIConfig->diffEmpty : sPlayerbotAIConfig->diffWithPlayer,
|
||||
float activityPercentageMod = pid.calculate(sRandomPlayerbotMgr->GetPlayers().empty() ?
|
||||
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffEmpty :
|
||||
sPlayerbotAIConfig->botActiveAloneSmartScaleDiffWithPlayer,
|
||||
sWorldUpdateTime.GetAverageUpdateTime());
|
||||
|
||||
activityPercentage = activityPercentageMod + 50;
|
||||
|
||||
Reference in New Issue
Block a user