diff --git a/OpenRA.Game/FileSystem/FileSystem.cs b/OpenRA.Game/FileSystem/FileSystem.cs index 658dcaf2e9..b3480e29e8 100644 --- a/OpenRA.Game/FileSystem/FileSystem.cs +++ b/OpenRA.Game/FileSystem/FileSystem.cs @@ -328,7 +328,7 @@ namespace OpenRA.FileSystem if (!(mod.Package is Folder)) return null; - path = Path.Combine(mod.Package.Name, filename); + path = Path.Combine(mod.Package.Name, filename); } else path = Path.Combine(parentPath, filename); diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index ee710c78b0..bf5987240a 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -83,7 +83,7 @@ namespace OpenRA.Graphics new float2( (int)Math.Round(p.X * deviceScale + g.Offset.X, 0) / deviceScale, p.Y + g.Offset.Y / deviceScale), - g.Sprite.Size / deviceScale); + g.Sprite.Size / deviceScale); p += new float2(g.Advance / deviceScale, 0); } diff --git a/OpenRA.Game/Network/Connection.cs b/OpenRA.Game/Network/Connection.cs index 82787903c3..3c47b2edee 100644 --- a/OpenRA.Game/Network/Connection.cs +++ b/OpenRA.Game/Network/Connection.cs @@ -169,7 +169,7 @@ namespace OpenRA.Network var reader = new BinaryReader(networkStream); var serverProtocol = reader.ReadInt32(); - if (ProtocolVersion.Version != serverProtocol) + if (serverProtocol != ProtocolVersion.Version) throw new InvalidOperationException( "Protocol version mismatch. Server={0} Client={1}" .F(serverProtocol, ProtocolVersion.Version)); diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index 5f72ef540c..30eb9e3a12 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -118,7 +118,7 @@ namespace OpenRA.Network public string IpAddress; public ClientState State = ClientState.Invalid; public int Team; - public string Slot; // Slot ID, or null for observer + public string Slot; // Slot ID, or null for observer public string Bot; // Bot type, null for real clients public int BotControllerClientIndex; // who added the bot to the slot public bool IsAdmin; @@ -160,8 +160,8 @@ namespace OpenRA.Network public class Slot { - public string PlayerReference; // PlayerReference to bind against. - public bool Closed; // Host has explicitly closed this slot. + public string PlayerReference; // PlayerReference to bind against. + public bool Closed; // Host has explicitly closed this slot. public bool AllowBots; public bool LockFaction; diff --git a/OpenRA.Game/Network/SyncReport.cs b/OpenRA.Game/Network/SyncReport.cs index 94c2086447..15964a90be 100644 --- a/OpenRA.Game/Network/SyncReport.cs +++ b/OpenRA.Game/Network/SyncReport.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Linq.Expressions; using System.Reflection; @@ -18,8 +19,6 @@ using OpenRA.Primitives; namespace OpenRA.Network { - using System.Globalization; - class SyncReport { const int NumSyncReports = 5; diff --git a/OpenRA.Game/Scripting/ScriptContext.cs b/OpenRA.Game/Scripting/ScriptContext.cs index 6bcf9d24c0..817ab5b1ed 100644 --- a/OpenRA.Game/Scripting/ScriptContext.cs +++ b/OpenRA.Game/Scripting/ScriptContext.cs @@ -123,18 +123,18 @@ namespace OpenRA.Scripting public sealed class ScriptContext : IDisposable { - public World World { get; private set; } - public WorldRenderer WorldRenderer { get; private set; } - - readonly MemoryConstrainedLuaRuntime runtime; - readonly LuaFunction tick; - // Restrict user scripts (excluding system libraries) to 50 MB of memory use const int MaxUserScriptMemory = 50 * 1024 * 1024; // Restrict the number of instructions that will be run per map function call const int MaxUserScriptInstructions = 1000000; + public World World { get; private set; } + public WorldRenderer WorldRenderer { get; private set; } + + readonly MemoryConstrainedLuaRuntime runtime; + readonly LuaFunction tick; + readonly Type[] knownActorCommands; public readonly Cache ActorCommands; public readonly Type[] PlayerCommands; diff --git a/OpenRA.Game/Selection.cs b/OpenRA.Game/Selection.cs index fdc7aad0e8..d67a16194c 100644 --- a/OpenRA.Game/Selection.cs +++ b/OpenRA.Game/Selection.cs @@ -82,7 +82,7 @@ namespace OpenRA { if (isClick) { - var adjNewSelection = newSelection.Take(1); /* TODO: select BEST, not FIRST */ + var adjNewSelection = newSelection.Take(1); // TODO: select BEST, not FIRST if (isCombine) actors.SymmetricExceptWith(adjNewSelection); else @@ -163,7 +163,7 @@ namespace OpenRA if (!mods.HasModifier(Modifiers.Shift)) controlGroups[group].Clear(); - for (var i = 0; i < 10; i++) /* all control groups */ + for (var i = 0; i < 10; i++) // all control groups controlGroups[i].RemoveAll(a => actors.Contains(a)); controlGroups[group].AddRange(actors.Where(a => a.Owner == world.LocalPlayer)); diff --git a/OpenRA.Game/Server/Connection.cs b/OpenRA.Game/Server/Connection.cs index da198be426..0815917833 100644 --- a/OpenRA.Game/Server/Connection.cs +++ b/OpenRA.Game/Server/Connection.cs @@ -102,7 +102,9 @@ namespace OpenRA.Server Log.Write("server", "Dropping client {0} for excessive order length = {1}", PlayerIndex, ExpectLength); return; } - } break; + + break; + } case ReceiveState.Data: { @@ -112,7 +114,9 @@ namespace OpenRA.Server server.DispatchOrders(this, Frame, bytes); ExpectLength = 8; State = ReceiveState.Header; - } break; + + break; + } } } } diff --git a/OpenRA.Game/WRot.cs b/OpenRA.Game/WRot.cs index aa4ea0d0d8..1165ae3d0e 100644 --- a/OpenRA.Game/WRot.cs +++ b/OpenRA.Game/WRot.cs @@ -70,6 +70,7 @@ namespace OpenRA var lsq = x * x + y * y + z * z + w * w; // Quaternion components use 10 bits, so there's no risk of overflow + #pragma warning disable SA1115 // Allow blank lines to visually separate matrix rows mtx = new Int32Matrix4x4( lsq - 2 * (y * y + z * z), 2 * (x * y + z * w), @@ -90,6 +91,7 @@ namespace OpenRA 0, 0, lsq); + #pragma warning restore SA1115 } public Int32Matrix4x4 AsMatrix() diff --git a/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs b/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs index c2927dfd5a..1491742277 100644 --- a/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs +++ b/OpenRA.Mods.Cnc/FileFormats/BlowfishKeyProvider.cs @@ -230,10 +230,10 @@ namespace OpenRA.Mods.Cnc.FileFormats InitBigNum(nTmp, 0, len); InitBigNum(n1, 0, len); nTwoBitLen = (int)BitLenBigNum(n2, len); - bit = ((uint)1) << (nTwoBitLen % 32); + bit = 1U << (nTwoBitLen % 32); j = ((nTwoBitLen + 32) / 32) - 1; nTwoByteLen = (uint)((nTwoBitLen - 1) / 32) * 4; - nTmp[nTwoByteLen / 4] |= ((uint)1) << ((nTwoBitLen - 1) & 0x1f); + nTmp[nTwoByteLen / 4] |= 1U << ((nTwoBitLen - 1) & 0x1f); while (nTwoBitLen > 0) { @@ -431,7 +431,7 @@ namespace OpenRA.Mods.Cnc.FileFormats InitTwoDw(n4, n4_len); n3_bitlen = (int)BitLenBigNum(n3, n4_len); n3_len = (uint)((n3_bitlen + 31) / 32); - bit_mask = (((uint)1) << ((n3_bitlen - 1) % 32)) >> 1; + bit_mask = (1U << ((n3_bitlen - 1) % 32)) >> 1; pn3 += n3_len - 1; n3_bitlen--; MoveBigNum(n1, n2, n4_len); diff --git a/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs b/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs index 19e26cf585..9e2b8e8fcb 100644 --- a/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs +++ b/OpenRA.Mods.Cnc/UtilityCommands/ImportTSMapCommand.cs @@ -210,7 +210,8 @@ namespace OpenRA.Mods.Cnc.UtilityCommands { // "tib" - Regular Tiberium { 0x01, new byte[] { 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 } }, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 } + }, // "btib" - Blue Tiberium { 0x02, new byte[] { 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, @@ -221,7 +222,8 @@ namespace OpenRA.Mods.Cnc.UtilityCommands // Should be "tib3" 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, - 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6 } }, + 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6 } + }, // Veins { 0x03, new byte[] { 0x7E } } diff --git a/OpenRA.Mods.Common/FileFormats/LZOCompression.cs b/OpenRA.Mods.Common/FileFormats/LZOCompression.cs index 2f11e5f7d8..2daa481f87 100644 --- a/OpenRA.Mods.Common/FileFormats/LZOCompression.cs +++ b/OpenRA.Mods.Common/FileFormats/LZOCompression.cs @@ -248,7 +248,7 @@ namespace OpenRA.Mods.Common.FileFormats { *op++ = *ip++; if (t > 2) - *op++ = *ip++; + (*op++) = *ip++; } t = *ip++; diff --git a/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs index d2aef9de15..c88d68b2d7 100644 --- a/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/ModContentLoadScreen.cs @@ -63,7 +63,8 @@ namespace OpenRA.Mods.Common.LoadScreens var widgetArgs = new WidgetArgs { { "continueLoading", () => - Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) }, + Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) + }, { "mod", selectedMod }, { "content", content }, }; @@ -77,7 +78,8 @@ namespace OpenRA.Mods.Common.LoadScreens { "mod", selectedMod }, { "content", content }, { "onCancel", () => - Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) } + Game.RunAfterTick(() => Game.InitializeMod(modId, new Arguments())) + } }; Ui.OpenWindow("CONTENT_PANEL", widgetArgs); diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index 22f7f54aa3..ad1621806f 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -441,7 +441,7 @@ namespace OpenRA.Mods.Common.Projectiles } // NOTE: It might be desirable to make lookahead more intelligent by outputting more information - // than just the highest point in the lookahead distance + // than just the highest point in the lookahead distance void InclineLookahead(World world, int distCheck, out int predClfHgt, out int predClfDist, out int lastHtChg, out int lastHt) { predClfHgt = 0; // Highest probed terrain height diff --git a/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs b/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs index 0372944cf6..162df83a71 100644 --- a/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs +++ b/OpenRA.Mods.Common/SpriteLoaders/ShpTDLoader.cs @@ -217,7 +217,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders bw.Write((ushort)0); bw.Write((ushort)size.Width); bw.Write((ushort)size.Height); - bw.Write((uint)0); + bw.Write(0U); foreach (var f in compressedFrames) { diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs index 4770c49e9c..2180113467 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs @@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads // Checks the number of anti air enemies around units protected virtual bool ShouldFlee(Squad owner) { - return base.ShouldFlee(owner, enemies => CountAntiAirUnits(enemies) * MissileUnitMultiplier > owner.Units.Count); + return ShouldFlee(owner, enemies => CountAntiAirUnits(enemies) * MissileUnitMultiplier > owner.Units.Count); } } diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/GroundStates.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/GroundStates.cs index aab417521c..496ec6ef63 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/GroundStates.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/GroundStates.cs @@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads { protected virtual bool ShouldFlee(Squad owner) { - return base.ShouldFlee(owner, enemies => !AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemies)); + return ShouldFlee(owner, enemies => !AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemies)); } protected Actor FindClosestEnemy(Squad owner) diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs index 51571d2aa6..d9be9abab1 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs @@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads { protected virtual bool ShouldFlee(Squad owner) { - return base.ShouldFlee(owner, enemies => !AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemies)); + return ShouldFlee(owner, enemies => !AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemies)); } protected Actor FindClosestEnemy(Squad owner) diff --git a/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs b/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs index e84609ec03..6854859090 100644 --- a/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs +++ b/OpenRA.Mods.Common/Traits/World/ActorSpawnManager.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits public readonly string Owner = "Creeps"; [Desc("Type of ActorSpawner with which it connects.")] - public readonly HashSet Types = new HashSet() { }; + public readonly HashSet Types = new HashSet() { }; public override object Create(ActorInitializer init) { return new ActorSpawnManager(init.Self, this); } } diff --git a/OpenRA.Mods.Common/Traits/World/MPStartLocations.cs b/OpenRA.Mods.Common/Traits/World/MPStartLocations.cs index d33aef763e..eb1389967a 100644 --- a/OpenRA.Mods.Common/Traits/World/MPStartLocations.cs +++ b/OpenRA.Mods.Common/Traits/World/MPStartLocations.cs @@ -132,7 +132,7 @@ namespace OpenRA.Mods.Common.Traits var n = taken.Count == 0 || !separateTeamSpawns ? world.SharedRandom.Next(available.Count) - : available // pick the most distant spawnpoint from everyone else + : available // pick the most distant spawnpoint from everyone else .Select((k, i) => Pair.New(k, i)) .MaxBy(a => taken.Sum(t => (t - a.First).LengthSquared)).Second; diff --git a/OpenRA.Mods.Common/UpdateRules/Rules/20190314/RefactorHarvesterIdle.cs b/OpenRA.Mods.Common/UpdateRules/Rules/20190314/RefactorHarvesterIdle.cs index cd0025c60f..90c20525bb 100644 --- a/OpenRA.Mods.Common/UpdateRules/Rules/20190314/RefactorHarvesterIdle.cs +++ b/OpenRA.Mods.Common/UpdateRules/Rules/20190314/RefactorHarvesterIdle.cs @@ -37,4 +37,4 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules yield break; } } -} \ No newline at end of file +} diff --git a/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs b/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs index 9c8d42bd09..cdb4bff714 100644 --- a/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ColorMixerWidget.cs @@ -134,7 +134,7 @@ namespace OpenRA.Mods.Common.Widgets var c = (int*)cc; for (var v = 0; v < 256; v++) for (var s = 0; s < 256; s++) - *(c + (v * 256) + s) = Color.FromAhsv(hue, s / 255f, (255 - v) / 255f).ToArgb(); + (*(c + (v * 256) + s)) = Color.FromAhsv(hue, s / 255f, (255 - v) / 255f).ToArgb(); } } diff --git a/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs b/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs index ffbfd593cf..9d452e6c4c 100644 --- a/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ExponentialSliderWidget.cs @@ -19,10 +19,8 @@ namespace OpenRA.Mods.Common.Widgets public double ExpA = 1.0e-3; public double ExpB = 6.908; - public ExponentialSliderWidget() : - base() { } - public ExponentialSliderWidget(ExponentialSliderWidget other) : - base(other) { } + public ExponentialSliderWidget(ExponentialSliderWidget other) + : base(other) { } float ExpFromLinear(float x) { diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index fa8589e3f9..a74fd1496d 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -136,7 +136,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (!isObserver && orderManager.LocalClient == null && world.LocalPlayer == null) return true; - var teamNumber = (uint)0; + var teamNumber = 0U; if (team) teamNumber = (isObserver || world.LocalPlayer.WinState != WinState.Undefined) ? uint.MaxValue : (uint)orderManager.LocalClient.Team; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index e13fe5d094..4d4fc33fd5 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -128,7 +128,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic { "orderManager", orderManager }, { "getMap", (Func)(() => map) }, { "onMouseDown", (Action)((preview, mapPreview, mi) => - LobbyUtils.SelectSpawnPoint(orderManager, preview, mapPreview, mi)) }, + LobbyUtils.SelectSpawnPoint(orderManager, preview, mapPreview, mi)) + }, { "getSpawnOccupants", (Func>)(mapPreview => LobbyUtils.GetSpawnOccupants(orderManager.LobbyInfo, mapPreview)) }, { "showUnoccupiedSpawnpoints", true }, }); @@ -402,7 +403,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic // Always scroll to bottom when we've typed something lobbyChatPanel.ScrollToBottom(); - var teamNumber = (uint)0; + var teamNumber = 0U; if (teamChat && orderManager.LocalClient != null) teamNumber = orderManager.LocalClient.IsObserver ? uint.MaxValue : (uint)orderManager.LocalClient.Team; diff --git a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs index 6b653a8a36..d7afb126ad 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs @@ -82,7 +82,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic { "getMap", (Func)(() => map) }, { "onMouseDown", (Action)((preview, mapPreview, mi) => { }) }, { "getSpawnOccupants", (Func>)(mapPreview => - LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, mapPreview)) }, + LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, mapPreview)) + }, { "showUnoccupiedSpawnpoints", false }, }); diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index efe230f294..f54c4f5094 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -70,11 +70,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic current.Save(); Action closeAndExit = () => { Ui.CloseWindow(); onExit(); }; - if (OriginalSoundDevice != current.Sound.Device || - OriginalGraphicsMode != current.Graphics.Mode || - OriginalGraphicsWindowedSize != current.Graphics.WindowedSize || - OriginalGraphicsFullscreenSize != current.Graphics.FullscreenSize || - OriginalServerDiscoverNatDevices != current.Server.DiscoverNatDevices) + if (current.Sound.Device != OriginalSoundDevice || + current.Graphics.Mode != OriginalGraphicsMode || + current.Graphics.WindowedSize != OriginalGraphicsWindowedSize || + current.Graphics.FullscreenSize != OriginalGraphicsFullscreenSize || + current.Server.DiscoverNatDevices != OriginalServerDiscoverNatDevices) { Action restart = () => { diff --git a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs b/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs index 8affb71f33..cd840d1379 100644 --- a/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/VqaPlayerWidget.cs @@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Widgets var scaledHeight = (int)videoSize.Y; overlay = new uint[Exts.NextPowerOf2(scaledHeight), 1]; - var black = (uint)255 << 24; + var black = 255U << 24; for (var y = 0; y < scaledHeight; y += 2) overlay[y, 0] = black;