Пример #1
0
        public bool Sync(WeaponComponent comp, CompBaseValues sync)
        {
            if (sync.Revision > Revision)
            {
                Revision = sync.Revision;
                Set.Sync(comp, sync.Set);
                State.Sync(comp, sync.State, CompStateValues.Caller.CompData);

                for (int i = 0; i < Targets.Length; i++)
                {
                    var w = comp.Platform.Weapons[i];
                    sync.Targets[i].SyncTarget(w, true);
                    Reloads[i].Sync(w, sync.Reloads[i], true);
                }

                return(true);
            }
            return(false);
        }
Пример #2
0
        public void Sync(WeaponComponent comp, CompBaseValues sync)
        {
            if (sync.Revision > Revision)
            {
                Revision = sync.Revision;
                Set.Sync(comp, sync.Set);
                State.Sync(comp, sync.State, CompStateValues.Caller.CompData);

                for (int i = 0; i < Targets.Length; i++)
                {
                    var w = comp.Platform.Weapons[i];
                    sync.Targets[i].SyncTarget(w);
                    Reloads[i].Sync(w, sync.Reloads[i]);
                }
            }
            else
            {
                Log.Line($"CompDynamicValues older revision");
            }
        }
Пример #3
0
 public override void CleanUp()
 {
     base.CleanUp();
     Data = null;
 }