Fixed rr_disableemptyrules not always working correctly

This commit is contained in:
Blixibon 2021-03-18 00:33:35 -05:00
parent 4e09f4bdf5
commit a05503e42b

View File

@ -793,6 +793,15 @@ void CResponseSystem::ResetResponseGroups()
{ {
m_Responses[ i ].Reset(); m_Responses[ i ].Reset();
} }
#ifdef MAPBASE
for ( ResponseRulePartition::tIndex idx = m_RulePartitions.First() ;
m_RulePartitions.IsValid(idx) ;
idx = m_RulePartitions.Next(idx) )
{
m_RulePartitions[ idx ].m_bEnabled = true;
}
#endif
} }
#ifdef MAPBASE #ifdef MAPBASE
@ -1045,6 +1054,9 @@ bool CResponseSystem::ResolveResponse( ResponseSearchResult& searchResult, int d
if ( g->IsNoRepeat() ) if ( g->IsNoRepeat() )
{ {
g->SetEnabled( false ); g->SetEnabled( false );
#ifdef MAPBASE
DisableEmptyRules();
#endif
return false; return false;
} }
idx = 0; idx = 0;
@ -1160,6 +1172,9 @@ bool CResponseSystem::GetBestResponse( ResponseSearchResult& searchResult, Rule
if ( g->IsNoRepeat() ) if ( g->IsNoRepeat() )
{ {
g->SetEnabled( false ); g->SetEnabled( false );
#ifdef MAPBASE
DisableEmptyRules();
#endif
return false; return false;
} }
responseIndex = 0; responseIndex = 0;