Beispiel #1
0
    public Player(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, UserProfile userProfile)
    {
        PlayerType pType = GetPlayerType(userProfile.GetField("permissionType"));

        Init(user_, go_, modelIdx_, pType, userProfile.UserID, userProfile.DisplayName, int.Parse((userProfile.TeamID == "" ? "0" : userProfile.TeamID)));
        ApplyAvatarOptions(userProfile);
    }
Beispiel #2
0
    private void Init(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, PlayerType pType_, string parseId_, string displayName_, int teamID_)
    {
        user            = user_;
        gameObject      = go_;
        playerType      = pType_;
        ModelIdx        = modelIdx_;
        ParseId         = (parseId_ == null) ? "" : parseId_;
        DisplayName     = (displayName_ == null) ? "" : displayName_;
        TeamID          = teamID_;
        InPrivateVolume = null;
        if (IsStealth)
        {
            ApplyAvatarOptions(GetAvatarOptionStr());
            Visible = false;
        }
        if (CameraMoveManager.Enabled)
        {
            SetNameBillboardCam(CameraMoveManager.Inst.Cam);
        }

        sitController = new SitController(this);

        // Check hardware info for changes.
        if (IsLocal)
        {
            string oldHardwareInfo = CommunicationManager.CurrentUserProfile.GetLocalHardwareInfo();
            CommunicationManager.CurrentUserProfile.UpdateLocalHardwareInfo();

            // If user's hardware has changed, send the new info to Parse.
            if (oldHardwareInfo != CommunicationManager.CurrentUserProfile.GetLocalHardwareInfo())
            {
                CommunicationManager.CurrentUserProfile.UpdateParseHardwareInfo();
            }
        }
    }
Beispiel #3
0
 public Player(Sfs2X.Entities.User user_, GameObject go_, PlayerInit init)
 {
     Init(user_, go_, init.modelIndex, init.ptype, init.parseID, init.displayName, init.teamID);
 }
Beispiel #4
0
    } // End of boolean operator.

    public Player(Sfs2X.Entities.User user_, GameObject go_, int modelIdx_, PlayerType pType_, string parseId_, string displayName_, int teamID_)
    {
        Init(user_, go_, modelIdx_, pType_, parseId_, displayName_, teamID_);
    }