Revert "new PauseState to differentiate game and editor pausing"
This reverts commit d1e18cad7a.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
case "pause":
|
||||
world.IssueOrder(new Order("PauseGame", null, false)
|
||||
{ TargetString = world.Paused == World.PauseState.Paused ? "UnPause" : "Pause" });
|
||||
{ TargetString = world.Paused ? "UnPause" : "Pause" });
|
||||
break;
|
||||
case "surrender":
|
||||
world.IssueOrder(new Order("Surrender", world.LocalPlayer.PlayerActor, false));
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.RA.Orders
|
||||
|
||||
IEnumerable<Order> InnerOrder(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
if (world.Paused == World.PauseState.Paused)
|
||||
if (world.Paused)
|
||||
yield break;
|
||||
|
||||
if (mi.Button == MouseButton.Left)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
public object Create(ActorInitializer init) { return new WithActiveAnimation(init.self, this); }
|
||||
}
|
||||
|
||||
public class WithActiveAnimation : ITickRender, INotifyBuildComplete, INotifySold
|
||||
public class WithActiveAnimation : ITick, INotifyBuildComplete, INotifySold
|
||||
{
|
||||
readonly IEnumerable<IDisable> disabled;
|
||||
readonly WithActiveAnimationInfo info;
|
||||
@@ -42,11 +42,8 @@ namespace OpenRA.Mods.RA.Render
|
||||
}
|
||||
|
||||
int ticks;
|
||||
public void TickRender(WorldRenderer wr, Actor self)
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (wr.world.Paused == World.PauseState.Paused)
|
||||
return;
|
||||
|
||||
if (!buildComplete)
|
||||
return;
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
{
|
||||
var startTick = Ui.LastTickTime;
|
||||
// Blink the status line
|
||||
status.IsVisible = () => (world.Paused == World.PauseState.Paused || world.Timestep != Game.Timestep)
|
||||
status.IsVisible = () => (world.Paused || world.Timestep != Game.Timestep)
|
||||
&& (Ui.LastTickTime - startTick) / 1000 % 2 == 0;
|
||||
|
||||
status.GetText = () =>
|
||||
{
|
||||
if (world.Paused == World.PauseState.Paused || world.Timestep == 0)
|
||||
if (world.Paused || world.Timestep == 0)
|
||||
return "Paused";
|
||||
|
||||
if (world.Timestep == 1)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
optionsBG.Visible ^= true;
|
||||
if (optionsBG.Visible)
|
||||
{
|
||||
cachedPause = world.PredictedPaused == World.PauseState.Paused;
|
||||
cachedPause = world.PredictedPaused;
|
||||
|
||||
if (world.LobbyInfo.IsSinglePlayer)
|
||||
world.SetPauseState(true);
|
||||
|
||||
Reference in New Issue
Block a user