----------------------------------------------------------------------------- Purpose: -----------------------------------------------------------------------------
| 2778 | // Purpose: |
| 2779 | //----------------------------------------------------------------------------- |
| 2780 | void CResponseSystem::CopyRuleFrom( Rule *pSrcRule, int iRule, CResponseSystem *pCustomSystem ) |
| 2781 | { |
| 2782 | // Verify data. |
| 2783 | Assert( pSrcRule ); |
| 2784 | Assert( pCustomSystem ); |
| 2785 | if ( !pSrcRule || !pCustomSystem ) |
| 2786 | return; |
| 2787 | |
| 2788 | // New rule |
| 2789 | Rule dstRule; |
| 2790 | |
| 2791 | dstRule.SetContext( pSrcRule->GetContext() ); |
| 2792 | dstRule.m_bMatchOnce = pSrcRule->m_bMatchOnce; |
| 2793 | dstRule.m_bEnabled = pSrcRule->m_bEnabled; |
| 2794 | dstRule.m_bApplyContextToWorld = pSrcRule->m_bApplyContextToWorld; |
| 2795 | |
| 2796 | // Copy off criteria. |
| 2797 | CopyCriteriaFrom( pSrcRule, &dstRule, pCustomSystem ); |
| 2798 | |
| 2799 | // Copy off responses. |
| 2800 | CopyResponsesFrom( pSrcRule, &dstRule, pCustomSystem ); |
| 2801 | |
| 2802 | // Copy off enumerations - Don't think we use these. |
| 2803 | // CopyEnumerationsFrom( pCustomSystem ); |
| 2804 | |
| 2805 | // Add rule. |
| 2806 | pCustomSystem->m_Rules.Insert( m_Rules.GetElementName( iRule ), dstRule ); |
| 2807 | } |
| 2808 | |
| 2809 | //----------------------------------------------------------------------------- |
| 2810 | // Purpose: A special purpose response system associated with a custom entity |
nothing calls this directly
no test coverage detected