ACR_ServerCommunicator.GUIResynchronizer.OnClientEnter C# (CSharp) Method

OnClientEnter() public static method

This method is called when the ClientEnter event fires for a player. Its purpose is to check whether the player has a pending resync request, and, if so, to execute the resync operation.
public static OnClientEnter ( uint PCObject, ACR_ServerCommunicator Script ) : void
PCObject uint
Script ACR_ServerCommunicator Supplies the script object.
return void
        public static void OnClientEnter(uint PCObject, ACR_ServerCommunicator Script)
        {
            PlayerState State = Script.TryGetPlayerState(PCObject);

            if (State == null)
                return;

            var ResyncInfo = (from RS in PlayerResyncStates
                              where RS.PlayerId == State.PlayerId
                              select RS).FirstOrDefault();

            if (ResyncInfo == null)
                return;

            //
            // Dequeue the resync state and start attempting to apply it to the
            // player object once the player has loaded.
            //

            PlayerResyncStates.Remove(ResyncInfo);
            ResynchronizePlayerState(ResyncInfo, PCObject, Script);
        }