Example #1
0
        public override float Score(IAIContext context, BasePlayer option)
        {
            int num;
            int num1;
            PlayerTargetContext playerTargetContext = context as PlayerTargetContext;

            if (playerTargetContext != null)
            {
                NPCPlayerApex self = playerTargetContext.Self as NPCPlayerApex;
                if (self)
                {
                    playerTargetContext.LineOfSight[playerTargetContext.CurrentOptionsIndex] = BestLineOfSight.Evaluate(self, option, out num, out num1);
                    return((float)(num + num1) * 0.5f * this.score);
                }
            }
            playerTargetContext.LineOfSight[playerTargetContext.CurrentOptionsIndex] = 0;
            return(0f);
        }
Example #2
0
        public virtual float Score(IAIContext context, BasePlayer option)
        {
            PlayerTargetContext playerTargetContext = context as PlayerTargetContext;

            if (playerTargetContext != null)
            {
                NPCPlayerApex self = playerTargetContext.Self as NPCPlayerApex;
                if (Object.op_Implicit((Object)self))
                {
                    int standing;
                    int crouched;
                    playerTargetContext.LineOfSight[playerTargetContext.CurrentOptionsIndex] = BestLineOfSight.Evaluate(self, option, out standing, out crouched);
                    return((float)(standing + crouched) * 0.5f * this.score);
                }
            }
            playerTargetContext.LineOfSight[playerTargetContext.CurrentOptionsIndex] = (byte)0;
            return(0.0f);
        }