ACR_ServerCommunicator.GUIResynchronizer.SendGUIStateToServer C# (CSharp) Method

SendGUIStateToServer() public static method

This method is called when a portal transition has been committed to send a player to a remote server.
public static SendGUIStateToServer ( PlayerState State, GameServer Server, ACR_ServerCommunicator Script ) : void
State PlayerState Supplies the local state for the player that is /// committed to a portal transition. ///
Server GameServer Supplies the destination server for the portal /// event.
Script ACR_ServerCommunicator Supplies the script object.
return void
        public static void SendGUIStateToServer(PlayerState State, GameServer Server, ACR_ServerCommunicator Script)
        {
            //
            // Build the resynchronization command.  The resynchronization
            // command is parsed by HandleGUIResync().  Note that the remote
            // and local servers may not be of the same version, i.e. the
            // remote server may not understand fields that are created by the
            // local server if it is of a newer version.
            //

            ResyncState ResyncInfo = new ResyncState(State.PlayerId, 0);

            if (State.ChatSelectGUIExpanded)
                ResyncInfo.ResyncFlags |= RESYNC_FLAG_CHAT_SELECT_EXPANDED;

            //
            // Dispatch the resync script execution request to the remote
            // server.  The remote server will process it when the request has
            // been received.
            //

            Script.RunScriptOnServer(Server.ServerId, "acr_resync_gui", ResyncInfo.ToString());
        }