feat(performance): reduce lag impact by attackers and yieldthread

This commit is contained in:
Yunfan Li
2023-06-11 22:30:47 +08:00
parent df43d7dff7
commit 81149246c4
2 changed files with 13 additions and 12 deletions

View File

@@ -54,7 +54,7 @@ bool PlayerbotAIBase::CanUpdateAI()
void PlayerbotAIBase::YieldThread(bool delay)
{
if (nextAICheckDelay < sPlayerbotAIConfig->reactDelay)
nextAICheckDelay = delay ? sPlayerbotAIConfig->reactDelay * 10 : sPlayerbotAIConfig->reactDelay;
nextAICheckDelay = delay ? sPlayerbotAIConfig->reactDelay * 10 : sPlayerbotAIConfig->reactDelay * 5;
}
bool PlayerbotAIBase::IsActive()