From 95c3ebbd101f045937b71d4b8126e75324255a3d Mon Sep 17 00:00:00 2001 From: Jammyjamjamman Date: Tue, 23 Jan 2018 02:32:39 +0000 Subject: [PATCH] modified AI code so that AI performs updates faster. --- source/glest_game/ai/ai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/ai/ai.cpp b/source/glest_game/ai/ai.cpp index d29808693..272db8490 100644 --- a/source/glest_game/ai/ai.cpp +++ b/source/glest_game/ai/ai.cpp @@ -402,7 +402,7 @@ void Ai::update() { if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld [ruleIdx = %d]\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),ruleIdx); - if((aiInterface->getTimer() % (rule->getTestInterval() * GameConstants::updateFps / 1000)) == 0) { + if((aiInterface->getTimer() % (rule->getTestInterval() * GameConstants::updateFps / 20000)) == 0) { if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld [ruleIdx = %d, before rule->test()]\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis(),ruleIdx);