Reworking ReplayRecorderConnection to no longer be an IConnection but rather attached to IConnection

This commit is contained in:
Whinis
2015-12-24 10:07:05 -05:00
parent 7cc8846d72
commit 155c74fc5f
5 changed files with 37 additions and 33 deletions

View File

@@ -49,9 +49,9 @@ namespace OpenRA
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
{
IConnection connection = new NetworkConnection(host, port);
var connection = new NetworkConnection(host, port);
if (recordReplay)
connection = new ReplayRecorderConnection(connection, TimestampedFilename);
connection.StartRecording(TimestampedFilename);
var om = new OrderManager(host, port, password, connection);
JoinInner(om);