コード例 #1
0
        /****************************************************************************************
         * Public helper functions
         ***************************************************************************************/
        bool                            FilterEntity(CBaseEntity pEnt)
        {
            bool bResult = false;

            if (pEnt != null)
            {
                switch (m_eFilterMode)
                {
                case EFilterMode.Normal:
                    bResult = FilterEntityNorm(pEnt);
                    break;

                case EFilterMode.Inverted:
                    bResult = !FilterEntityNorm(pEnt);
                    break;

                case EFilterMode.Random:
                    bResult = NRand.randBool(m_flRandomChance);
                    break;

                case EFilterMode.AllowAll:
                    bResult = true;
                    break;

                case EFilterMode.BlockAll:
                    bResult = false;
                    break;
                }
            }
            return(bResult);
        }
コード例 #2
0
 /****************************************************************************************
  * Private helper functions
  ***************************************************************************************/
 bool    PassRandom()
 {
     return(NRand.randBool(m_flRandomChance));
 }