Exemple #1
0
    private void OnRaisePlayer(Player dead_player)
    {
        NonPlayer nearestAliveNpc = AIUtility.GetNearestAliveNpc(dead_player);

        if (!(nearestAliveNpc == null) && !(nearestAliveNpc.controller == null))
        {
            Brain brain = nearestAliveNpc.controller.brain;
            if (!(brain == null) && brain.think != null)
            {
                brain.targetCtrl.SetAllyTarget(dead_player);
                if (brain.fsm != null)
                {
                    brain.fsm.ChangeState(STATE_TYPE.RAISE_ALLY);
                }
            }
        }
    }