Pause the game option.
Game is paused when PAUSE on the keyboard has been hit. It can also be unpaused this way.
This commit is contained in:
@@ -199,7 +199,18 @@ namespace OpenRA
|
||||
{
|
||||
return new Order("HandshakeResponse", null, false) { IsImmediate = true, TargetString = text };
|
||||
}
|
||||
|
||||
public static Order PauseRequest()
|
||||
{
|
||||
return new Order("PauseRequest", null, false) { IsImmediate = true, TargetString="" }; //TODO: targetbool?
|
||||
}
|
||||
|
||||
public static Order PauseGame()
|
||||
{
|
||||
return new Order("PauseGame", null, false) { IsImmediate = true, TargetString=""}; //TODO: targetbool?
|
||||
}
|
||||
|
||||
|
||||
public static Order Command(string text)
|
||||
{
|
||||
return new Order("Command", null, false) { IsImmediate = true, TargetString = text };
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace OpenRA.Network
|
||||
public int LastTickTime = Environment.TickCount;
|
||||
|
||||
public bool GameStarted { get { return NetFrameNumber != 0; } }
|
||||
public bool GamePaused {get; set;}
|
||||
public IConnection Connection { get; private set; }
|
||||
|
||||
public readonly int SyncHeaderSize = 9;
|
||||
|
||||
@@ -94,6 +94,12 @@ namespace OpenRA.Network
|
||||
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, false);
|
||||
break;
|
||||
}
|
||||
|
||||
case "PauseGame":
|
||||
{
|
||||
orderManager.GamePaused = !orderManager.GamePaused;
|
||||
break;
|
||||
}
|
||||
|
||||
case "HandshakeRequest":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user