mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-29 23:15:56 -04:00
fix a bit of chatty ai logs
This commit is contained in:
@@ -52,7 +52,13 @@ void AiLogManager::setLogging(NetworkId const & networkId, bool const enabled)
|
||||
// ----------------------------------------------------------------------
|
||||
bool AiLogManager::isLogging(NetworkId const & networkId)
|
||||
{
|
||||
return ConfigServerGame::isAiLoggingEnabled() || (s_aiList.find(networkId) != s_aiList.end());
|
||||
bool result = (ConfigServerGame::isAiLoggingEnabled() && (s_aiList.find(networkId) != s_aiList.end()));
|
||||
|
||||
if (!result) {
|
||||
s_aiList.erase(networkId);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -167,8 +167,7 @@ AICreatureController::~AICreatureController()
|
||||
if (owner != nullptr && owner->isAuthoritative() && !getHibernate() && m_hibernationDelay.get() > 0 && m_hibernationTimer.get() > 0)
|
||||
ObjectTracker::removeDelayedHibernatingAI();
|
||||
|
||||
if ( (owner != nullptr)
|
||||
&& AiLogManager::isLogging(owner->getNetworkId()))
|
||||
if ((owner != nullptr) && AiLogManager::isLogging(owner->getNetworkId()))
|
||||
{
|
||||
AiLogManager::setLogging(owner->getNetworkId(), false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user