Skip to content

Commit

Permalink
Make the thing send the thing.
Browse files Browse the repository at this point in the history
Yeah.
  • Loading branch information
CarbonNeuron committed Oct 8, 2020
1 parent 763bfea commit e60a680
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions AmongUsCapture/ClientSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void Connect(string url, string connectCode)
socket.ConnectAsync().ContinueWith(t =>
{
SendConnectCode(connectCode);

});
} catch (ArgumentNullException) {
Console.WriteLine("Invalid bot host, not connecting");
Expand All @@ -85,6 +86,7 @@ public void SendConnectCode(string connectCode, EventHandler callback)
{
GameMemReader.getInstance().ForceUpdatePlayers();
GameMemReader.getInstance().ForceTransmitState();
GameMemReader.getInstance().ForceTransmitLobby();
if (callback != null)
{
callback.Invoke(this, new EventArgs());
Expand Down
10 changes: 10 additions & 0 deletions AmongUsCapture/GameMemReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ public void RunLoop()
shouldForceTransmitState = false;
}

if (state != oldState && state == GameState.LOBBY)
{
shouldTransmitLobby = true;
}

oldState = state;

newPlayerInfos.Clear();
Expand Down Expand Up @@ -367,6 +372,11 @@ public void RunLoop()
}
}

public void ForceTransmitLobby()
{
this.shouldTransmitLobby = true;
}

public void ForceUpdatePlayers()
{
this.shouldForceUpdatePlayers = true;
Expand Down
1 change: 0 additions & 1 deletion AmongUsCapture/UserForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ private void doConnect(string url)
{

Settings.PersistentSettings.host = url;

};

try
Expand Down

0 comments on commit e60a680

Please sign in to comment.