Ejemplo n.º 1
0
    // Token: 0x06001A10 RID: 6672 RVA: 0x000D4E70 File Offset: 0x000D3070
    protected override int FindValidTargetPrepped(RaycastHit[] hits)
    {
        float num = (float)this.m_AIEntity.GetHijackerLevel();

        this.m_CursorTex = Manager.GetInputControl().m_CursorTextureInteract;
        for (int i = 0; i < hits.Length; i++)
        {
            AIEntity component = base.GetTransform(hits[i]).GetComponent <AIEntity>();
            if (ModdedAbilityHijack.PossibleHijackTarget(component, this.m_Owner))
            {
                if (component.HijackLevelRequired > 0 && !component.IsReturningToBase() && !this.TargetIsResearcher(component))
                {
                    if ((float)component.HijackLevelRequired <= num && !this.m_AIEntity.IsJammed && !component.IsScrambled())
                    {
                        return(i);
                    }
                    this.m_CursorTex = Manager.GetInputControl().m_CursorTextureInteractFailLevel;
                }
                else
                {
                    this.m_CursorTex = Manager.GetInputControl().m_CursorTextureInteractFailLevel;
                }
            }
        }
        return(-1);
    }