move Game.IsStarted to World.GameHasStarted

This commit is contained in:
Bob
2010-04-13 20:05:34 +12:00
parent e224c64ccc
commit 2a4460213c
5 changed files with 6 additions and 6 deletions

View File

@@ -129,7 +129,7 @@ namespace OpenRA
public void Tick(World world) public void Tick(World world)
{ {
if (!Game.IsStarted) return; if (!world.GameHasStarted) return;
if (world.LocalPlayer == null) return; if (world.LocalPlayer == null) return;
TickPaletteAnimation(); TickPaletteAnimation();

View File

@@ -125,7 +125,7 @@ namespace OpenRA
try try
{ {
if (!Game.IsStarted) if (!world.GameHasStarted)
return "default"; return "default";
var mi = new MouseInput var mi = new MouseInput

View File

@@ -318,7 +318,7 @@ namespace OpenRA
LobbyInfo = session; LobbyInfo = session;
if (!IsStarted) if (!world.GameHasStarted)
world.SharedRandom = new OpenRA.Thirdparty.Random(LobbyInfo.GlobalSettings.RandomSeed); world.SharedRandom = new OpenRA.Thirdparty.Random(LobbyInfo.GlobalSettings.RandomSeed);
if (Game.orderManager.Connection.ConnectionState == ConnectionState.Connected) if (Game.orderManager.Connection.ConnectionState == ConnectionState.Connected)
@@ -347,8 +347,6 @@ namespace OpenRA
public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */ public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */
public static bool IsStarted { get { return orderManager.GameStarted; } }
public static void LoadShellMap(string map) public static void LoadShellMap(string map)
{ {
LoadMap(map); LoadMap(map);

View File

@@ -125,7 +125,7 @@ namespace OpenRA.Graphics
mapOnlySheet.Texture.SetData(oreLayer); mapOnlySheet.Texture.SetData(oreLayer);
if (!Game.IsStarted || !world.Queries.OwnedBy[world.LocalPlayer].WithTrait<ProvidesRadar>().Any()) if (!world.GameHasStarted || !world.Queries.OwnedBy[world.LocalPlayer].WithTrait<ProvidesRadar>().Any())
return; return;
var bitmap = new Bitmap(oreLayer); var bitmap = new Bitmap(oreLayer);

View File

@@ -46,6 +46,8 @@ namespace OpenRA
public void AddPlayer(Player p) { players[p.Index] = p; } public void AddPlayer(Player p) { players[p.Index] = p; }
public bool GameHasStarted { get { return Game.orderManager.GameStarted; } }
int localPlayerIndex; int localPlayerIndex;
public Player LocalPlayer public Player LocalPlayer
{ {