This commit is contained in:
vis2k 2021-06-16 12:44:13 +08:00
parent b98e01b348
commit 2df5357647
2 changed files with 9 additions and 9 deletions

View File

@ -163,7 +163,7 @@ protected void ConnectClientBlocking(out NetworkConnectionToClient connectionToC
} }
// fully connect client to local server & authenticate // fully connect client to local server & authenticate
protected void ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient) protected void ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient)
{ {
ConnectClientBlocking(out connectionToClient); ConnectClientBlocking(out connectionToClient);

View File

@ -386,7 +386,7 @@ public void ReadyMessageSetsClientReady()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// send ready message // send ready message
NetworkClient.Ready(); NetworkClient.Ready();
@ -400,7 +400,7 @@ public void SendCommand()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// need to be ready for commands // need to be ready for commands
NetworkClient.Ready(); NetworkClient.Ready();
@ -431,7 +431,7 @@ public void SendCommand_CalledOnCorrectComponent()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// need to be ready for commands // need to be ready for commands
NetworkClient.Ready(); NetworkClient.Ready();
@ -461,7 +461,7 @@ public void SendCommand_OnlyAllowedOnOwnedObjects()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// need to be ready for commands // need to be ready for commands
NetworkClient.Ready(); NetworkClient.Ready();
@ -493,7 +493,7 @@ public void SendCommand_RequiresAuthority()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// need to be ready for commands // need to be ready for commands
NetworkClient.Ready(); NetworkClient.Ready();
@ -627,7 +627,7 @@ public void ShowForConnection()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// overwrite spawn message handler // overwrite spawn message handler
int called = 0; int called = 0;
@ -656,7 +656,7 @@ public void ShowForConnection_OnlyWorksIfReady()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// overwrite spawn message handler // overwrite spawn message handler
int called = 0; int called = 0;
@ -682,7 +682,7 @@ public void HideForConnection()
{ {
// listen & connect // listen & connect
NetworkServer.Listen(1); NetworkServer.Listen(1);
ConnectClientBlockingAndAuthenticate(out NetworkConnectionToClient connectionToClient); ConnectClientBlockingAuthenticated(out NetworkConnectionToClient connectionToClient);
// overwrite spawn message handler // overwrite spawn message handler
int called = 0; int called = 0;