move Session back to Game

This commit is contained in:
Chris Forbes
2010-08-23 18:31:43 +12:00
parent aeccf53e97
commit 09d9396123
6 changed files with 12 additions and 10 deletions

View File

@@ -72,7 +72,6 @@
<Compile Include="Primitives\DisposableAction.cs" /> <Compile Include="Primitives\DisposableAction.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Thirdparty\Random.cs" /> <Compile Include="Thirdparty\Random.cs" />
<Compile Include="Session.cs" />
<Compile Include="Support\Log.cs" /> <Compile Include="Support\Log.cs" />
<Compile Include="Support\Stopwatch.cs" /> <Compile Include="Support\Stopwatch.cs" />
<Compile Include="Support\Timer.cs" /> <Compile Include="Support\Timer.cs" />

View File

@@ -187,7 +187,7 @@ namespace OpenRA
LobbyInfo = session; LobbyInfo = session;
if( !world.GameHasStarted ) if( !world.GameHasStarted )
world.SharedRandom = new OpenRA.Thirdparty.Random( LobbyInfo.GlobalSettings.RandomSeed ); world.SharedRandom = new XRandom( LobbyInfo.GlobalSettings.RandomSeed );
if (orderManager.Connection.ConnectionState == ConnectionState.Connected) if (orderManager.Connection.ConnectionState == ConnectionState.Connected)
world.SetLocalPlayer(orderManager.Connection.LocalClientId); world.SetLocalPlayer(orderManager.Connection.LocalClientId);

View File

@@ -9,9 +9,9 @@
#endregion #endregion
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Drawing;
namespace OpenRA.FileFormats namespace OpenRA.Network
{ {
// todo: ship most of this back to the Game assembly; // todo: ship most of this back to the Game assembly;
// it was only in FileFormats due to the original server model, // it was only in FileFormats due to the original server model,
@@ -31,8 +31,8 @@ namespace OpenRA.FileFormats
public class Client public class Client
{ {
public int Index; public int Index;
public System.Drawing.Color Color1; public Color Color1;
public System.Drawing.Color Color2; public Color Color2;
public string Country; public string Country;
public int SpawnPoint; public int SpawnPoint;
public string Name; public string Name;

View File

@@ -234,6 +234,7 @@
<Compile Include="ActorReference.cs" /> <Compile Include="ActorReference.cs" />
<Compile Include="ModData.cs" /> <Compile Include="ModData.cs" />
<Compile Include="Map.cs" /> <Compile Include="Map.cs" />
<Compile Include="Network\Session.cs" />
<Compile Include="ObjectCreator.cs" /> <Compile Include="ObjectCreator.cs" />
<Compile Include="Network\SyncReport.cs" /> <Compile Include="Network\SyncReport.cs" />
<Compile Include="Traits\PrimaryBuilding.cs" /> <Compile Include="Traits\PrimaryBuilding.cs" />

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA.FileFormats; using OpenRA.FileFormats;
using OpenRA.Network;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA namespace OpenRA

View File

@@ -19,6 +19,7 @@ using System.Net.Sockets;
using System.Threading; using System.Threading;
using OpenRA.FileFormats; using OpenRA.FileFormats;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Network;
namespace OpenRA.Server namespace OpenRA.Server
{ {