Add a setting to pause the shellmap.

This commit is contained in:
Paul Chote
2020-12-30 14:54:28 +00:00
committed by reaperrr
parent aeab9a8116
commit 16d0f8a5a6
6 changed files with 26 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ namespace OpenRA
readonly List<IEffect> effects = new List<IEffect>();
readonly List<IEffect> unpartitionedEffects = new List<IEffect>();
readonly List<ISync> syncedEffects = new List<ISync>();
readonly GameSettings gameSettings;
readonly Queue<Action<World>> frameEndActions = new Queue<Action<World>>();
@@ -226,6 +227,7 @@ namespace OpenRA
};
RulesContainTemporaryBlocker = map.Rules.Actors.Any(a => a.Value.HasTraitInfo<ITemporaryBlockerInfo>());
gameSettings = Game.Settings.Game;
}
public void AddToMaps(Actor self, IOccupySpace ios)
@@ -424,7 +426,9 @@ namespace OpenRA
wasLoadingGameSave = false;
}
if (!Paused)
// Allow users to pause the shellmap via the settings menu
// Some traits initialize important state during the first tick, so we must allow it to tick at least once
if (!Paused && (Type != WorldType.Shellmap || !gameSettings.PauseShellmap || WorldTick == 0))
{
WorldTick++;