From d4fd66adf9928cc42f1f546d85f8498250fd1cb1 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Tue, 5 Dec 2023 15:06:48 +0200 Subject: [PATCH] Renamed SyncAttribute to VerifySyncAttribute --- OpenRA.Game/Network/SyncReport.cs | 4 ++-- OpenRA.Game/Sync.cs | 8 ++++---- OpenRA.Game/Traits/DebugPauseState.cs | 5 +++-- OpenRA.Game/Traits/Player/FrozenActorLayer.cs | 4 ++-- OpenRA.Game/Traits/Player/Shroud.cs | 3 ++- OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs | 2 +- OpenRA.Mods.Cnc/Traits/Attack/AttackTesla.cs | 4 ++-- OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs | 4 ++-- OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs | 6 +++--- OpenRA.Mods.Cnc/Traits/GpsWatcher.cs | 8 ++++---- OpenRA.Mods.Cnc/Traits/PortableChrono.cs | 2 +- OpenRA.Mods.Cnc/Traits/TDGunboat.cs | 4 ++-- OpenRA.Mods.Common/Lint/CheckSyncAnnotations.cs | 2 +- OpenRA.Mods.Common/Projectiles/AreaBeam.cs | 6 +++--- OpenRA.Mods.Common/Projectiles/Bullet.cs | 2 +- OpenRA.Mods.Common/Projectiles/GravityBomb.cs | 2 +- OpenRA.Mods.Common/Projectiles/LaserZap.cs | 4 ++-- OpenRA.Mods.Common/Projectiles/Missile.cs | 6 +++--- OpenRA.Mods.Common/Projectiles/Railgun.cs | 2 +- OpenRA.Mods.Common/Traits/AffectsShroud.cs | 6 +++--- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 4 ++-- OpenRA.Mods.Common/Traits/Air/AttackBomber.cs | 6 +++--- OpenRA.Mods.Common/Traits/AmmoPool.cs | 4 ++-- OpenRA.Mods.Common/Traits/Attack/AttackBase.cs | 2 +- OpenRA.Mods.Common/Traits/AutoTarget.cs | 4 ++-- OpenRA.Mods.Common/Traits/BodyOrientation.cs | 2 +- OpenRA.Mods.Common/Traits/Buildings/Building.cs | 3 ++- OpenRA.Mods.Common/Traits/Buildings/Gate.cs | 2 +- .../Traits/Buildings/RepairableBuilding.cs | 2 +- OpenRA.Mods.Common/Traits/Carryall.cs | 2 +- OpenRA.Mods.Common/Traits/CashTrickler.cs | 2 +- OpenRA.Mods.Common/Traits/ChangesHealth.cs | 4 ++-- OpenRA.Mods.Common/Traits/Cloak.cs | 2 +- .../Conditions/GrantChargedConditionOnToggle.cs | 2 +- .../Conditions/GrantConditionOnClientDock.cs | 2 +- .../Traits/Conditions/GrantConditionOnHostDock.cs | 2 +- .../Conditions/GrantConditionOnProduction.cs | 2 +- .../Traits/Conditions/ToggleConditionOnOrder.cs | 2 +- OpenRA.Mods.Common/Traits/Crates/Crate.cs | 4 ++-- OpenRA.Mods.Common/Traits/DockHost.cs | 4 ++-- OpenRA.Mods.Common/Traits/ExperienceTrickler.cs | 2 +- OpenRA.Mods.Common/Traits/FireWarheads.cs | 2 +- OpenRA.Mods.Common/Traits/GainsExperience.cs | 4 ++-- OpenRA.Mods.Common/Traits/Harvester.cs | 2 +- OpenRA.Mods.Common/Traits/Health.cs | 2 +- OpenRA.Mods.Common/Traits/Husk.cs | 6 +++--- OpenRA.Mods.Common/Traits/Immobile.cs | 4 ++-- OpenRA.Mods.Common/Traits/Infantry/ScaredyCat.cs | 2 +- OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs | 2 +- OpenRA.Mods.Common/Traits/Minelayer.cs | 2 +- OpenRA.Mods.Common/Traits/Mobile.cs | 8 ++++---- .../Traits/Modifiers/FrozenUnderFog.cs | 2 +- OpenRA.Mods.Common/Traits/ParaDrop.cs | 6 +++--- OpenRA.Mods.Common/Traits/Player/DeveloperMode.cs | 14 +++++++------- .../Traits/Player/MissionObjectives.cs | 2 +- .../Traits/Player/PlayerExperience.cs | 2 +- .../Traits/Player/PlayerResources.cs | 6 +++--- .../Traits/Player/ProductionQueue.cs | 4 ++-- .../Traits/Player/StrategicVictoryConditions.cs | 2 +- .../Traits/Power/Player/PowerManager.cs | 4 ++-- OpenRA.Mods.Common/Traits/ReloadAmmoPool.cs | 2 +- OpenRA.Mods.Common/Traits/Render/Hovers.cs | 2 +- OpenRA.Mods.Common/Traits/StoresResources.cs | 2 +- OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs | 2 +- OpenRA.Mods.Common/Traits/Turreted.cs | 2 +- OpenRA.Mods.D2k/Projectiles/SonicBlast.cs | 2 +- 66 files changed, 117 insertions(+), 114 deletions(-) diff --git a/OpenRA.Game/Network/SyncReport.cs b/OpenRA.Game/Network/SyncReport.cs index 9c55b54bd7..16ac855b1c 100644 --- a/OpenRA.Game/Network/SyncReport.cs +++ b/OpenRA.Game/Network/SyncReport.cs @@ -202,10 +202,10 @@ namespace OpenRA.Network { const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; var fields = type.GetFields(Flags) - .Where(fi => !fi.IsLiteral && !fi.IsStatic && fi.HasAttribute()) + .Where(fi => !fi.IsLiteral && !fi.IsStatic && fi.HasAttribute()) .ToList(); var properties = type.GetProperties(Flags) - .Where(pi => pi.HasAttribute()) + .Where(pi => pi.HasAttribute()) .ToList(); foreach (var prop in properties) diff --git a/OpenRA.Game/Sync.cs b/OpenRA.Game/Sync.cs index e4ed5af4d6..e0b08d3402 100644 --- a/OpenRA.Game/Sync.cs +++ b/OpenRA.Game/Sync.cs @@ -21,7 +21,7 @@ using OpenRA.Traits; namespace OpenRA { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public sealed class SyncAttribute : Attribute { } + public sealed class VerifySyncAttribute : Attribute { } // Marker interface public interface ISync { } @@ -70,7 +70,7 @@ namespace OpenRA il.MarkLabel(l); } else if (type != typeof(int)) - throw new NotImplementedException($"SyncAttribute on member of unhashable type: {type.FullName}"); + throw new NotImplementedException($"{nameof(VerifySyncAttribute)} on member of unhashable type: {type.FullName}"); il.Emit(OpCodes.Xor); } @@ -86,7 +86,7 @@ namespace OpenRA il.Emit(OpCodes.Ldc_I4_0); const BindingFlags Binding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; - foreach (var field in t.GetFields(Binding).Where(x => x.HasAttribute())) + foreach (var field in t.GetFields(Binding).Where(x => x.HasAttribute())) { il.Emit(OpCodes.Ldloc, this_); il.Emit(OpCodes.Ldfld, field); @@ -94,7 +94,7 @@ namespace OpenRA EmitSyncOpcodes(field.FieldType, il); } - foreach (var prop in t.GetProperties(Binding).Where(x => x.HasAttribute())) + foreach (var prop in t.GetProperties(Binding).Where(x => x.HasAttribute())) { il.Emit(OpCodes.Ldloc, this_); il.EmitCall(OpCodes.Call, prop.GetGetMethod(true), null); diff --git a/OpenRA.Game/Traits/DebugPauseState.cs b/OpenRA.Game/Traits/DebugPauseState.cs index 746ccbe1d8..f428919d1d 100644 --- a/OpenRA.Game/Traits/DebugPauseState.cs +++ b/OpenRA.Game/Traits/DebugPauseState.cs @@ -21,8 +21,9 @@ namespace OpenRA.Traits public class DebugPauseState : ISync { readonly World world; - [Sync] - public bool Paused => world.Paused; + + [VerifySync] + public bool IsWorldPaused => world.Paused; public DebugPauseState(World world) { this.world = world; } } diff --git a/OpenRA.Game/Traits/Player/FrozenActorLayer.cs b/OpenRA.Game/Traits/Player/FrozenActorLayer.cs index eaed97ee64..ff9661b008 100644 --- a/OpenRA.Game/Traits/Player/FrozenActorLayer.cs +++ b/OpenRA.Game/Traits/Player/FrozenActorLayer.cs @@ -244,10 +244,10 @@ namespace OpenRA.Traits public class FrozenActorLayer : IRender, ITick, ISync { - [Sync] + [VerifySync] public int VisibilityHash; - [Sync] + [VerifySync] public int FrozenHash; readonly int binSize; diff --git a/OpenRA.Game/Traits/Player/Shroud.cs b/OpenRA.Game/Traits/Player/Shroud.cs index 709d1f51ef..c96457e11d 100644 --- a/OpenRA.Game/Traits/Player/Shroud.cs +++ b/OpenRA.Game/Traits/Player/Shroud.cs @@ -100,7 +100,8 @@ namespace OpenRA.Traits readonly ProjectedCellLayer resolvedType; bool disabledChanged; - [Sync] + + [VerifySync] bool disabled; public bool Disabled { diff --git a/OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs b/OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs index 0d21f47f8d..26befb0ce8 100644 --- a/OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs +++ b/OpenRA.Mods.Cnc/Projectiles/TeslaZap.cs @@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Projectiles int ticksUntilRemove; int damageDuration; - [Sync] + [VerifySync] WPos target; public TeslaZap(TeslaZapInfo info, ProjectileArgs args) diff --git a/OpenRA.Mods.Cnc/Traits/Attack/AttackTesla.cs b/OpenRA.Mods.Cnc/Traits/Attack/AttackTesla.cs index 42124893b4..c50d2b30bd 100644 --- a/OpenRA.Mods.Cnc/Traits/Attack/AttackTesla.cs +++ b/OpenRA.Mods.Cnc/Traits/Attack/AttackTesla.cs @@ -43,10 +43,10 @@ namespace OpenRA.Mods.Cnc.Traits { readonly AttackTeslaInfo info; - [Sync] + [VerifySync] int charges; - [Sync] + [VerifySync] int timeToRecharge; public AttackTesla(Actor self, AttackTeslaInfo info) diff --git a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs index d9c6063ad2..f195fe6c48 100644 --- a/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs +++ b/OpenRA.Mods.Cnc/Traits/Chronoshiftable.cs @@ -55,10 +55,10 @@ namespace OpenRA.Mods.Cnc.Traits IPositionable iPositionable; // Return-to-origin logic - [Sync] + [VerifySync] public CPos Origin; - [Sync] + [VerifySync] public int ReturnTicks = 0; public Chronoshiftable(ActorInitializer init, ChronoshiftableInfo info) diff --git a/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs b/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs index 62f8f0cc31..6bb2dda8df 100644 --- a/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs +++ b/OpenRA.Mods.Cnc/Traits/ConyardChronoReturn.cs @@ -69,13 +69,13 @@ namespace OpenRA.Mods.Cnc.Traits bool returnOriginal; bool selling; - [Sync] + [VerifySync] int returnTicks = 0; - [Sync] + [VerifySync] readonly CPos origin; - [Sync] + [VerifySync] bool triggered; public ConyardChronoReturn(ActorInitializer init, ConyardChronoReturnInfo info) diff --git a/OpenRA.Mods.Cnc/Traits/GpsWatcher.cs b/OpenRA.Mods.Cnc/Traits/GpsWatcher.cs index 3404ef207b..1cb86dfcd6 100644 --- a/OpenRA.Mods.Cnc/Traits/GpsWatcher.cs +++ b/OpenRA.Mods.Cnc/Traits/GpsWatcher.cs @@ -27,17 +27,17 @@ namespace OpenRA.Mods.Cnc.Traits sealed class GpsWatcher : ISync, IPreventsShroudReset { - [Sync] + [VerifySync] public bool Launched { get; private set; } - [Sync] + [VerifySync] public bool GrantedAllies { get; private set; } - [Sync] + [VerifySync] public bool Granted { get; private set; } // Whether this watcher has explored the terrain (by becoming Launched, or an ally becoming Launched) - [Sync] + [VerifySync] bool explored; readonly Player owner; diff --git a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs index fbb00fd544..e2f67dd796 100644 --- a/OpenRA.Mods.Cnc/Traits/PortableChrono.cs +++ b/OpenRA.Mods.Cnc/Traits/PortableChrono.cs @@ -81,7 +81,7 @@ namespace OpenRA.Mods.Cnc.Traits sealed class PortableChrono : PausableConditionalTrait, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync { readonly IMove move; - [Sync] + [VerifySync] int chargeTick = 0; public PortableChrono(Actor self, PortableChronoInfo info) diff --git a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs index 2366a1e51b..b0ea5fc26e 100644 --- a/OpenRA.Mods.Cnc/Traits/TDGunboat.cs +++ b/OpenRA.Mods.Cnc/Traits/TDGunboat.cs @@ -65,7 +65,7 @@ namespace OpenRA.Mods.Cnc.Traits IEnumerable speedModifiers; INotifyCenterPositionChanged[] notifyCenterPositionChanged; - [Sync] + [VerifySync] public WAngle Facing { get => Orientation.Yaw; @@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Traits public WRot Orientation { get; private set; } - [Sync] + [VerifySync] public WPos CenterPosition { get; private set; } public CPos TopLeft => self.World.Map.CellContaining(CenterPosition); diff --git a/OpenRA.Mods.Common/Lint/CheckSyncAnnotations.cs b/OpenRA.Mods.Common/Lint/CheckSyncAnnotations.cs index ac12b33a2b..5678c552bd 100644 --- a/OpenRA.Mods.Common/Lint/CheckSyncAnnotations.cs +++ b/OpenRA.Mods.Common/Lint/CheckSyncAnnotations.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Lint const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly; while (type != null) { - if (((MemberInfo[])type.GetFields(Flags)).Concat(type.GetProperties(Flags)).Any(Utility.HasAttribute)) + if (((MemberInfo[])type.GetFields(Flags)).Concat(type.GetProperties(Flags)).Any(Utility.HasAttribute)) return true; type = type.BaseType; } diff --git a/OpenRA.Mods.Common/Projectiles/AreaBeam.cs b/OpenRA.Mods.Common/Projectiles/AreaBeam.cs index 6a38ea1970..20fa529409 100644 --- a/OpenRA.Mods.Common/Projectiles/AreaBeam.cs +++ b/OpenRA.Mods.Common/Projectiles/AreaBeam.cs @@ -95,13 +95,13 @@ namespace OpenRA.Mods.Common.Projectiles readonly WDist speed; readonly WDist weaponRange; - [Sync] + [VerifySync] WPos headPos; - [Sync] + [VerifySync] WPos tailPos; - [Sync] + [VerifySync] WPos target; int length; diff --git a/OpenRA.Mods.Common/Projectiles/Bullet.cs b/OpenRA.Mods.Common/Projectiles/Bullet.cs index 987d608c54..3ceaeb786e 100644 --- a/OpenRA.Mods.Common/Projectiles/Bullet.cs +++ b/OpenRA.Mods.Common/Projectiles/Bullet.cs @@ -157,7 +157,7 @@ namespace OpenRA.Mods.Common.Projectiles readonly ContrailRenderable contrail; - [Sync] + [VerifySync] protected WPos pos, lastPos, target, source; int length; diff --git a/OpenRA.Mods.Common/Projectiles/GravityBomb.cs b/OpenRA.Mods.Common/Projectiles/GravityBomb.cs index ec783ac030..323eda0b83 100644 --- a/OpenRA.Mods.Common/Projectiles/GravityBomb.cs +++ b/OpenRA.Mods.Common/Projectiles/GravityBomb.cs @@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Projectiles WVec velocity; - [Sync] + [VerifySync] WPos pos, lastPos; public GravityBomb(GravityBombInfo info, ProjectileArgs args) diff --git a/OpenRA.Mods.Common/Projectiles/LaserZap.cs b/OpenRA.Mods.Common/Projectiles/LaserZap.cs index e40578555f..5f353de68f 100644 --- a/OpenRA.Mods.Common/Projectiles/LaserZap.cs +++ b/OpenRA.Mods.Common/Projectiles/LaserZap.cs @@ -118,10 +118,10 @@ namespace OpenRA.Mods.Common.Projectiles int interval; bool showHitAnim; - [Sync] + [VerifySync] WPos target; - [Sync] + [VerifySync] WPos source; public LaserZap(LaserZapInfo info, ProjectileArgs args, Color color) diff --git a/OpenRA.Mods.Common/Projectiles/Missile.cs b/OpenRA.Mods.Common/Projectiles/Missile.cs index 1167ba1436..32d75cb885 100644 --- a/OpenRA.Mods.Common/Projectiles/Missile.cs +++ b/OpenRA.Mods.Common/Projectiles/Missile.cs @@ -229,7 +229,7 @@ namespace OpenRA.Mods.Common.Projectiles WVec tarVel; WVec predVel; - [Sync] + [VerifySync] WPos pos; WVec velocity; @@ -240,10 +240,10 @@ namespace OpenRA.Mods.Common.Projectiles WAngle renderFacing; - [Sync] + [VerifySync] int hFacing; - [Sync] + [VerifySync] int vFacing; public Missile(MissileInfo info, ProjectileArgs args) diff --git a/OpenRA.Mods.Common/Projectiles/Railgun.cs b/OpenRA.Mods.Common/Projectiles/Railgun.cs index aaa7994345..5505b5c00d 100644 --- a/OpenRA.Mods.Common/Projectiles/Railgun.cs +++ b/OpenRA.Mods.Common/Projectiles/Railgun.cs @@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Projectiles int ticks; bool animationComplete; - [Sync] + [VerifySync] WPos target; // Computing these in Railgun instead of RailgunRenderable saves Info.Duration ticks of computation. diff --git a/OpenRA.Mods.Common/Traits/AffectsShroud.cs b/OpenRA.Mods.Common/Traits/AffectsShroud.cs index 226ba0ea03..6b68de302f 100644 --- a/OpenRA.Mods.Common/Traits/AffectsShroud.cs +++ b/OpenRA.Mods.Common/Traits/AffectsShroud.cs @@ -39,13 +39,13 @@ namespace OpenRA.Mods.Common.Traits readonly HashSet footprint; - [Sync] + [VerifySync] CPos cachedLocation; - [Sync] + [VerifySync] WDist cachedRange; - [Sync] + [VerifySync] protected bool CachedTraitDisabled { get; private set; } WPos cachedPos; diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index af209a058a..104b8c15b0 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -242,7 +242,7 @@ namespace OpenRA.Mods.Common.Traits INotifyCenterPositionChanged[] notifyCenterPositionChanged; IOverrideAircraftLanding overrideAircraftLanding; - [Sync] + [VerifySync] public WAngle Facing { get => Orientation.Yaw; @@ -263,7 +263,7 @@ namespace OpenRA.Mods.Common.Traits public WRot Orientation { get; private set; } - [Sync] + [VerifySync] public WPos CenterPosition { get; private set; } public CPos TopLeft => self.World.Map.CellContaining(CenterPosition); diff --git a/OpenRA.Mods.Common/Traits/Air/AttackBomber.cs b/OpenRA.Mods.Common/Traits/Air/AttackBomber.cs index b22236a42b..3aeef4924c 100644 --- a/OpenRA.Mods.Common/Traits/Air/AttackBomber.cs +++ b/OpenRA.Mods.Common/Traits/Air/AttackBomber.cs @@ -27,13 +27,13 @@ namespace OpenRA.Mods.Common.Traits { readonly AttackBomberInfo info; - [Sync] + [VerifySync] Target target; - [Sync] + [VerifySync] bool inAttackRange; - [Sync] + [VerifySync] bool facingTarget = true; public event Action OnRemovedFromWorld = self => { }; diff --git a/OpenRA.Mods.Common/Traits/AmmoPool.cs b/OpenRA.Mods.Common/Traits/AmmoPool.cs index 1f17e6ac79..e7cafc5302 100644 --- a/OpenRA.Mods.Common/Traits/AmmoPool.cs +++ b/OpenRA.Mods.Common/Traits/AmmoPool.cs @@ -53,10 +53,10 @@ namespace OpenRA.Mods.Common.Traits readonly Stack tokens = []; // HACK: Temporarily needed until Rearm activity is gone for good - [Sync] + [VerifySync] public int RemainingTicks; - [Sync] + [VerifySync] public int CurrentAmmoCount { get; private set; } public bool HasAmmo => CurrentAmmoCount > 0; diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 55808a4174..c23239a6e4 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits readonly string attackOrderName = "Attack"; readonly string forceAttackOrderName = "ForceAttack"; - [Sync] + [VerifySync] public bool IsAiming { get; set; } public IEnumerable Armaments => getArmaments(); diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index abcbb04985..e13269ee16 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -137,13 +137,13 @@ namespace OpenRA.Mods.Common.Traits readonly bool allowMovement; - [Sync] + [VerifySync] int nextScanTime = 0; public UnitStance Stance { get; private set; } public bool AllowMove => allowMovement && Stance > UnitStance.Defend; - [Sync] + [VerifySync] public Actor Aggressor; // NOT SYNCED: do not refer to this anywhere other than UI code diff --git a/OpenRA.Mods.Common/Traits/BodyOrientation.cs b/OpenRA.Mods.Common/Traits/BodyOrientation.cs index e16fbd649f..819d595700 100644 --- a/OpenRA.Mods.Common/Traits/BodyOrientation.cs +++ b/OpenRA.Mods.Common/Traits/BodyOrientation.cs @@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Traits readonly BodyOrientationInfo info; readonly Lazy quantizedFacings; - [Sync] + [VerifySync] public int QuantizedFacings => quantizedFacings.Value; public BodyOrientation(ActorInitializer init, BodyOrientationInfo info) diff --git a/OpenRA.Mods.Common/Traits/Buildings/Building.cs b/OpenRA.Mods.Common/Traits/Buildings/Building.cs index a86286af54..08e22e8af5 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Building.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Building.cs @@ -267,6 +267,7 @@ namespace OpenRA.Mods.Common.Traits INotifyAddedToWorld, INotifyRemovedFromWorld { public readonly BuildingInfo Info; + readonly Actor self; readonly BuildingInfluence influence; @@ -274,7 +275,7 @@ namespace OpenRA.Mods.Common.Traits readonly (CPos, SubCell)[] targetableCells; readonly CPos[] transitOnlyCells; - [Sync] + [VerifySync] public CPos TopLeft { get; } public WPos CenterPosition { get; } diff --git a/OpenRA.Mods.Common/Traits/Buildings/Gate.cs b/OpenRA.Mods.Common/Traits/Buildings/Gate.cs index c64b7a1616..e8c08639ff 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Gate.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Gate.cs @@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits public readonly int OpenPosition; - [Sync] + [VerifySync] public int Position { get; private set; } int desiredPosition; diff --git a/OpenRA.Mods.Common/Traits/Buildings/RepairableBuilding.cs b/OpenRA.Mods.Common/Traits/Buildings/RepairableBuilding.cs index ca5d06480d..6ce8a266fc 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/RepairableBuilding.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/RepairableBuilding.cs @@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits isNotActiveAlly = player => player.WinState != WinState.Undefined || self.Owner.RelationshipWith(player) != PlayerRelationship.Ally; } - [Sync] + [VerifySync] public int RepairersHash { get diff --git a/OpenRA.Mods.Common/Traits/Carryall.cs b/OpenRA.Mods.Common/Traits/Carryall.cs index 8a9ab4b978..edbc7fc124 100644 --- a/OpenRA.Mods.Common/Traits/Carryall.cs +++ b/OpenRA.Mods.Common/Traits/Carryall.cs @@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Traits readonly Actor self; // The actor we are currently carrying. - [Sync] + [VerifySync] public Actor Carryable { get; protected set; } public CarryallState State { get; protected set; } diff --git a/OpenRA.Mods.Common/Traits/CashTrickler.cs b/OpenRA.Mods.Common/Traits/CashTrickler.cs index dd13404015..f2330fddc2 100644 --- a/OpenRA.Mods.Common/Traits/CashTrickler.cs +++ b/OpenRA.Mods.Common/Traits/CashTrickler.cs @@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits PlayerResources resources; Cloak[] cloaks; - [Sync] + [VerifySync] public int Ticks { get; private set; } public CashTrickler(CashTricklerInfo info) diff --git a/OpenRA.Mods.Common/Traits/ChangesHealth.cs b/OpenRA.Mods.Common/Traits/ChangesHealth.cs index 1bf574639b..83d6e1995a 100644 --- a/OpenRA.Mods.Common/Traits/ChangesHealth.cs +++ b/OpenRA.Mods.Common/Traits/ChangesHealth.cs @@ -45,10 +45,10 @@ namespace OpenRA.Mods.Common.Traits { readonly IHealth health; - [Sync] + [VerifySync] int ticks; - [Sync] + [VerifySync] int damageTicks; public ChangesHealth(Actor self, ChangesHealthInfo info) diff --git a/OpenRA.Mods.Common/Traits/Cloak.cs b/OpenRA.Mods.Common/Traits/Cloak.cs index 0e95e82218..6fd8298af5 100644 --- a/OpenRA.Mods.Common/Traits/Cloak.cs +++ b/OpenRA.Mods.Common/Traits/Cloak.cs @@ -117,7 +117,7 @@ namespace OpenRA.Mods.Common.Traits readonly float3 cloakedColor; readonly float cloakedColorAlpha; - [Sync] + [VerifySync] int remainingTime; bool isDocking; diff --git a/OpenRA.Mods.Common/Traits/Conditions/GrantChargedConditionOnToggle.cs b/OpenRA.Mods.Common/Traits/Conditions/GrantChargedConditionOnToggle.cs index 131e8102df..44e9ef9121 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/GrantChargedConditionOnToggle.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/GrantChargedConditionOnToggle.cs @@ -93,7 +93,7 @@ namespace OpenRA.Mods.Common.Traits public class GrantChargedConditionOnToggle : PausableConditionalTrait, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync, IIssueDeployOrder { - [Sync] + [VerifySync] int chargeTick = 0; bool isActive = false; diff --git a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnClientDock.cs b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnClientDock.cs index a20dbff499..38876d56a0 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnClientDock.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnClientDock.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits int token; int delayedtoken; - [Sync] + [VerifySync] public int Duration { get; private set; } public GrantConditionOnClientDock(GrantConditionOnClientDockInfo info) diff --git a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnHostDock.cs b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnHostDock.cs index 83794fec3b..14a3a2532e 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnHostDock.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnHostDock.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits int token; int delayedtoken; - [Sync] + [VerifySync] public int Duration { get; private set; } public GrantConditionOnHostDock(GrantConditionOnHostDockInfo info) diff --git a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs index ec602894cc..5e5e9828d3 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/GrantConditionOnProduction.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Traits int token = Actor.InvalidConditionToken; - [Sync] + [VerifySync] int ticks; public GrantConditionOnProduction(GrantConditionOnProductionInfo info) diff --git a/OpenRA.Mods.Common/Traits/Conditions/ToggleConditionOnOrder.cs b/OpenRA.Mods.Common/Traits/Conditions/ToggleConditionOnOrder.cs index c653230dcd..93c4c96096 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/ToggleConditionOnOrder.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/ToggleConditionOnOrder.cs @@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits int conditionToken = Actor.InvalidConditionToken; // If the trait is paused this may be true with no condition granted - [Sync] + [VerifySync] bool enabled = false; public ToggleConditionOnOrder(ToggleConditionOnOrderInfo info) diff --git a/OpenRA.Mods.Common/Traits/Crates/Crate.cs b/OpenRA.Mods.Common/Traits/Crates/Crate.cs index 7e373b4f0f..e45cf4eefb 100644 --- a/OpenRA.Mods.Common/Traits/Crates/Crate.cs +++ b/OpenRA.Mods.Common/Traits/Crates/Crate.cs @@ -80,10 +80,10 @@ namespace OpenRA.Mods.Common.Traits bool collected; INotifyCenterPositionChanged[] notifyCenterPositionChanged; - [Sync] + [VerifySync] int ticks; - [Sync] + [VerifySync] public CPos Location; public Crate(ActorInitializer init, CrateInfo info) diff --git a/OpenRA.Mods.Common/Traits/DockHost.cs b/OpenRA.Mods.Common/Traits/DockHost.cs index 9a38feb041..8b7bdf4097 100644 --- a/OpenRA.Mods.Common/Traits/DockHost.cs +++ b/OpenRA.Mods.Common/Traits/DockHost.cs @@ -61,10 +61,10 @@ namespace OpenRA.Mods.Common.Traits public WPos DockPosition => self.CenterPosition + Info.DockOffset; - [Sync] + [VerifySync] bool preventDock = false; - [Sync] + [VerifySync] protected Actor dockedClientActor = null; protected DockClientManager dockedClient = null; diff --git a/OpenRA.Mods.Common/Traits/ExperienceTrickler.cs b/OpenRA.Mods.Common/Traits/ExperienceTrickler.cs index 81d713aeca..355f3fa8a6 100644 --- a/OpenRA.Mods.Common/Traits/ExperienceTrickler.cs +++ b/OpenRA.Mods.Common/Traits/ExperienceTrickler.cs @@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits readonly ExperienceTricklerInfo info; readonly GainsExperience gainsExperience; - [Sync] + [VerifySync] int ticks; public ExperienceTrickler(Actor self, ExperienceTricklerInfo info) diff --git a/OpenRA.Mods.Common/Traits/FireWarheads.cs b/OpenRA.Mods.Common/Traits/FireWarheads.cs index f1736399b2..7b2a20b6d7 100644 --- a/OpenRA.Mods.Common/Traits/FireWarheads.cs +++ b/OpenRA.Mods.Common/Traits/FireWarheads.cs @@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits public class FireWarheads : PausableConditionalTrait, ITick, ISync { - [Sync] + [VerifySync] int cooldown = 0; public FireWarheads(FireWarheadsInfo info) diff --git a/OpenRA.Mods.Common/Traits/GainsExperience.cs b/OpenRA.Mods.Common/Traits/GainsExperience.cs index 58a95dd2d0..d6acc65f04 100644 --- a/OpenRA.Mods.Common/Traits/GainsExperience.cs +++ b/OpenRA.Mods.Common/Traits/GainsExperience.cs @@ -65,10 +65,10 @@ namespace OpenRA.Mods.Common.Traits readonly List<(int RequiredExperience, string Condition)> nextLevel = []; // Stored as a percentage of our value - [Sync] + [VerifySync] public int Experience { get; private set; } - [Sync] + [VerifySync] public int Level { get; private set; } public readonly int MaxLevel; diff --git a/OpenRA.Mods.Common/Traits/Harvester.cs b/OpenRA.Mods.Common/Traits/Harvester.cs index 59c044234a..70009ddc9c 100644 --- a/OpenRA.Mods.Common/Traits/Harvester.cs +++ b/OpenRA.Mods.Common/Traits/Harvester.cs @@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.Traits public override BitSet GetDockType => Info.Type; - [Sync] + [VerifySync] int currentUnloadTicks; public Harvester(Actor self, HarvesterInfo info) diff --git a/OpenRA.Mods.Common/Traits/Health.cs b/OpenRA.Mods.Common/Traits/Health.cs index 3ba0744438..66a9f53f50 100644 --- a/OpenRA.Mods.Common/Traits/Health.cs +++ b/OpenRA.Mods.Common/Traits/Health.cs @@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Traits DisplayHP = HP; } - [Sync] + [VerifySync] public int HP { get; private set; } public int MaxHP { get; } diff --git a/OpenRA.Mods.Common/Traits/Husk.cs b/OpenRA.Mods.Common/Traits/Husk.cs index d65fc9382f..cff47f4261 100644 --- a/OpenRA.Mods.Common/Traits/Husk.cs +++ b/OpenRA.Mods.Common/Traits/Husk.cs @@ -78,13 +78,13 @@ namespace OpenRA.Mods.Common.Traits INotifyCenterPositionChanged[] notifyCenterPositionChanged; - [Sync] + [VerifySync] public CPos TopLeft { get; private set; } - [Sync] + [VerifySync] public WPos CenterPosition { get; private set; } - [Sync] + [VerifySync] public WAngle Facing { get => Orientation.Yaw; diff --git a/OpenRA.Mods.Common/Traits/Immobile.cs b/OpenRA.Mods.Common/Traits/Immobile.cs index 996b545226..61e3b7adad 100644 --- a/OpenRA.Mods.Common/Traits/Immobile.cs +++ b/OpenRA.Mods.Common/Traits/Immobile.cs @@ -43,9 +43,9 @@ namespace OpenRA.Mods.Common.Traits occupied = []; } - [Sync] + [VerifySync] public CPos TopLeft { get; } - [Sync] + [VerifySync] public WPos CenterPosition { get; } public (CPos, SubCell)[] OccupiedCells() { return occupied; } diff --git a/OpenRA.Mods.Common/Traits/Infantry/ScaredyCat.cs b/OpenRA.Mods.Common/Traits/Infantry/ScaredyCat.cs index 10ab54eaf9..66f59b1a14 100644 --- a/OpenRA.Mods.Common/Traits/Infantry/ScaredyCat.cs +++ b/OpenRA.Mods.Common/Traits/Infantry/ScaredyCat.cs @@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits readonly Actor self; readonly Func avoidTerrainFilter; - [Sync] + [VerifySync] int panicStartedTick; bool Panicking => panicStartedTick > 0; diff --git a/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs b/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs index 4081772de8..893ad98f2d 100644 --- a/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs +++ b/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs @@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits { readonly TakeCoverInfo info; - [Sync] + [VerifySync] int remainingDuration = 0; bool isProne = false; diff --git a/OpenRA.Mods.Common/Traits/Minelayer.cs b/OpenRA.Mods.Common/Traits/Minelayer.cs index b085875caf..1df72ecb01 100644 --- a/OpenRA.Mods.Common/Traits/Minelayer.cs +++ b/OpenRA.Mods.Common/Traits/Minelayer.cs @@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits readonly Actor self; - [Sync] + [VerifySync] CPos minefieldStart; public Minelayer(Actor self, MinelayerInfo info) diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 44deaf4da9..ed4e440b83 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -223,7 +223,7 @@ namespace OpenRA.Mods.Common.Traits #region IFacing - [Sync] + [VerifySync] public WAngle Facing { get => orientation.Yaw; @@ -236,10 +236,10 @@ namespace OpenRA.Mods.Common.Traits #endregion - [Sync] + [VerifySync] public CPos FromCell { get; private set; } - [Sync] + [VerifySync] public CPos ToCell { get; private set; } public Locomotor Locomotor { get; private set; } @@ -248,7 +248,7 @@ namespace OpenRA.Mods.Common.Traits #region IOccupySpace - [Sync] + [VerifySync] public WPos CenterPosition { get; private set; } public CPos TopLeft => ToCell; diff --git a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs index 5a676b54fd..c7363867e0 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs @@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits public class FrozenUnderFog : ICreatesFrozenActors, IRenderModifier, IDefaultVisibility, ITickRender, ISync, INotifyCreated, INotifyOwnerChanged, INotifyActorDisposing { - [Sync] + [VerifySync] public int VisibilityHash; readonly FrozenUnderFogInfo info; diff --git a/OpenRA.Mods.Common/Traits/ParaDrop.cs b/OpenRA.Mods.Common/Traits/ParaDrop.cs index 6155c8efdd..eaf6d7012d 100644 --- a/OpenRA.Mods.Common/Traits/ParaDrop.cs +++ b/OpenRA.Mods.Common/Traits/ParaDrop.cs @@ -39,13 +39,13 @@ namespace OpenRA.Mods.Common.Traits public event Action OnEnteredDropRange = self => { }; public event Action OnExitedDropRange = self => { }; - [Sync] + [VerifySync] bool inDropRange; - [Sync] + [VerifySync] Target target; - [Sync] + [VerifySync] int dropDelay; bool checkForSuitableCell; diff --git a/OpenRA.Mods.Common/Traits/Player/DeveloperMode.cs b/OpenRA.Mods.Common/Traits/Player/DeveloperMode.cs index b78b4fa374..d54c8a5bd1 100644 --- a/OpenRA.Mods.Common/Traits/Player/DeveloperMode.cs +++ b/OpenRA.Mods.Common/Traits/Player/DeveloperMode.cs @@ -82,25 +82,25 @@ namespace OpenRA.Mods.Common.Traits readonly DeveloperModeInfo info; public bool Enabled { get; private set; } - [Sync] + [VerifySync] bool fastCharge; - [Sync] + [VerifySync] bool allTech; - [Sync] + [VerifySync] bool fastBuild; - [Sync] + [VerifySync] bool disableShroud; - [Sync] + [VerifySync] bool pathDebug; - [Sync] + [VerifySync] bool unlimitedPower; - [Sync] + [VerifySync] bool buildAnywhere; public bool FastCharge => Enabled && fastCharge; diff --git a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs index e4af268b7c..d7c77c07f7 100644 --- a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs +++ b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs @@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits Player[] enemies; Player[] allies; - [Sync] + [VerifySync] public int ObjectivesHash { get diff --git a/OpenRA.Mods.Common/Traits/Player/PlayerExperience.cs b/OpenRA.Mods.Common/Traits/Player/PlayerExperience.cs index 588e221d3e..5a5a9eec56 100644 --- a/OpenRA.Mods.Common/Traits/Player/PlayerExperience.cs +++ b/OpenRA.Mods.Common/Traits/Player/PlayerExperience.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits public class PlayerExperience : ISync { - [Sync] + [VerifySync] public int Experience { get; private set; } public void GiveExperience(int num) diff --git a/OpenRA.Mods.Common/Traits/Player/PlayerResources.cs b/OpenRA.Mods.Common/Traits/Player/PlayerResources.cs index 8087eb12d1..9c78517941 100644 --- a/OpenRA.Mods.Common/Traits/Player/PlayerResources.cs +++ b/OpenRA.Mods.Common/Traits/Player/PlayerResources.cs @@ -95,13 +95,13 @@ namespace OpenRA.Mods.Common.Traits lastNotificationTime = -Info.InsufficientFundsNotificationInterval; } - [Sync] + [VerifySync] public int Cash; - [Sync] + [VerifySync] public int Resources; - [Sync] + [VerifySync] public int ResourceCapacity; public int Earned; diff --git a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs index 18f4ea917a..388a7b92da 100644 --- a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs @@ -153,12 +153,12 @@ namespace OpenRA.Mods.Common.Traits public Actor Actor { get; } - [Sync] + [VerifySync] public bool Enabled { get; protected set; } public string Faction { get; private set; } - [Sync] + [VerifySync] public bool IsValidFaction { get; private set; } public ProductionQueue(ActorInitializer init, ProductionQueueInfo info) diff --git a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs index 8f8a20b254..fbc35736f2 100644 --- a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs +++ b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs @@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits readonly StrategicVictoryConditionsInfo info; - [Sync] + [VerifySync] public int TicksLeft; readonly Player player; diff --git a/OpenRA.Mods.Common/Traits/Power/Player/PowerManager.cs b/OpenRA.Mods.Common/Traits/Power/Player/PowerManager.cs index a996b82f84..8d8ca6eb1a 100644 --- a/OpenRA.Mods.Common/Traits/Power/Player/PowerManager.cs +++ b/OpenRA.Mods.Common/Traits/Power/Player/PowerManager.cs @@ -41,10 +41,10 @@ namespace OpenRA.Mods.Common.Traits readonly Dictionary powerDrain = []; - [Sync] + [VerifySync] public int PowerProvided { get; private set; } - [Sync] + [VerifySync] public int PowerDrained { get; private set; } public int ExcessPower => PowerProvided - PowerDrained; diff --git a/OpenRA.Mods.Common/Traits/ReloadAmmoPool.cs b/OpenRA.Mods.Common/Traits/ReloadAmmoPool.cs index 854eae9946..e018d29c0c 100644 --- a/OpenRA.Mods.Common/Traits/ReloadAmmoPool.cs +++ b/OpenRA.Mods.Common/Traits/ReloadAmmoPool.cs @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits AmmoPool ammoPool; IReloadAmmoModifier[] modifiers; - [Sync] + [VerifySync] int remainingTicks; public ReloadAmmoPool(ReloadAmmoPoolInfo info) diff --git a/OpenRA.Mods.Common/Traits/Render/Hovers.cs b/OpenRA.Mods.Common/Traits/Render/Hovers.cs index 08a8ee7d2d..8ab57ff760 100644 --- a/OpenRA.Mods.Common/Traits/Render/Hovers.cs +++ b/OpenRA.Mods.Common/Traits/Render/Hovers.cs @@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits.Render int ticks; - [Sync] + [VerifySync] public WVec WorldVisualOffset { get; private set; } public Hovers(HoversInfo info) diff --git a/OpenRA.Mods.Common/Traits/StoresResources.cs b/OpenRA.Mods.Common/Traits/StoresResources.cs index a724f269a1..003934dbc9 100644 --- a/OpenRA.Mods.Common/Traits/StoresResources.cs +++ b/OpenRA.Mods.Common/Traits/StoresResources.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits readonly Dictionary contents = []; readonly StoresResourcesInfo info; - [Sync] + [VerifySync] public int ContentHash { get diff --git a/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs b/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs index 3e9fe34e49..9a8addc568 100644 --- a/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs +++ b/OpenRA.Mods.Common/Traits/TemporaryOwnerManager.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits Player originalOwner; Player changingOwner; - [Sync] + [VerifySync] int remaining = -1; int duration; diff --git a/OpenRA.Mods.Common/Traits/Turreted.cs b/OpenRA.Mods.Common/Traits/Turreted.cs index cd54620fc9..281b4c2108 100644 --- a/OpenRA.Mods.Common/Traits/Turreted.cs +++ b/OpenRA.Mods.Common/Traits/Turreted.cs @@ -134,7 +134,7 @@ namespace OpenRA.Mods.Common.Traits BodyOrientation body; int quantizedFacings; - [Sync] + [VerifySync] public int QuantizedFacings { get => quantizedFacings; diff --git a/OpenRA.Mods.D2k/Projectiles/SonicBlast.cs b/OpenRA.Mods.D2k/Projectiles/SonicBlast.cs index 5f72bed58f..cdca8b308a 100644 --- a/OpenRA.Mods.D2k/Projectiles/SonicBlast.cs +++ b/OpenRA.Mods.D2k/Projectiles/SonicBlast.cs @@ -69,7 +69,7 @@ namespace OpenRA.Mods.D2k.Projectiles readonly WDist speed; readonly SonicBlastRenderer renderer; - [Sync] + [VerifySync] WPos pos, lastPos; readonly WPos target; int length;