New login process + a little bit of cleanup

No reliability required :) Will get to the client soon
This commit is contained in:
juanjp600
2016-08-31 18:26:17 -03:00
parent d561805010
commit b9a246ca68
4 changed files with 258 additions and 75 deletions

View File

@@ -114,10 +114,7 @@ namespace Barotrauma.Networking
client = new NetClient(config);
netPeer = client;
client.Start();
NetOutgoingMessage outmsg = client.CreateMessage();
System.Net.IPEndPoint IPEndPoint = null;
try
{
@@ -133,8 +130,7 @@ namespace Barotrauma.Networking
// Connect client, to ip previously requested from user
try
{
client.Connect(IPEndPoint, outmsg);
}
catch (Exception e)
{
@@ -446,11 +442,6 @@ namespace Barotrauma.Networking
public bool SpectateClicked(GUIButton button, object userData)
{
NetOutgoingMessage msg = client.CreateMessage();
client.SendMessage(msg, NetDeliveryMethod.ReliableUnordered);
if (button != null) button.Enabled = false;
return false;