Exemplo n.º 1
0
    private EntityPlayer CreatePlayer(EHeroType heroType, Vector3 pos, Vector3 rot)
    {
        CfgPlayerTable playerTable = CfgPlayer.Instance.GetConfigTable((int)heroType);

        if (playerTable == null)
        {
            return(null);
        }

        EntityPlayer player = new EntityPlayer(++EntityID, heroType);

        player.Create(this, playerTable.AvatarID, pos, rot);
        return(player);
    }