Skip to content

Commit 03bcc60

Browse files
authored
Merge pull request #626 from misternebula/dev
0.28.1
2 parents 992851a + 1fdefbb commit 03bcc60

File tree

71 files changed

+450
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+450
-297
lines changed

MirrorWeaver/Program.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ public static void Main(string[] args)
5050

5151
var log = new ConsoleLogger();
5252
var weaver = new Weaver(log);
53-
if (!weaver.Weave(assembly, resolver, out _))
53+
if (!weaver.Weave(assembly, resolver, out var modified))
5454
{
5555
Environment.Exit(1);
5656
}
5757

58-
assembly.Write(new WriterParameters { WriteSymbols = assembly.MainModule.HasSymbols });
58+
if (modified)
59+
{
60+
assembly.Write(new WriterParameters { WriteSymbols = assembly.MainModule.HasSymbols });
61+
}
5962
}
60-
}
63+
}

MirrorWeaver/QSBReaderWriterProcessor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static class QSBReaderWriterProcessor
1414
/// traverses from non generic classes up thru base types
1515
/// in order to replace generic parameters with their corresponding generic arguments.
1616
/// </summary>
17-
public static void Process(ModuleDefinition module, Writers writers, Readers readers, ref bool weavingFailed)
17+
public static bool Process(ModuleDefinition module, Writers writers, Readers readers, ref bool weavingFailed)
1818
{
1919
var sw = Stopwatch.StartNew();
2020

@@ -85,5 +85,6 @@ argType is GenericParameter genericParameter &&
8585
}
8686

8787
Console.WriteLine($"got/generated {count} read/write funcs in {sw.ElapsedMilliseconds} ms");
88+
return count > 0;
8889
}
8990
}

MirrorWeaver/Weaver/Weaver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public bool Weave(AssemblyDefinition assembly, IAssemblyResolver resolver, out b
207207
Console.WriteLine($"Script Module: {moduleDefinition.Name}");
208208

209209
// CHANGED
210-
QSBReaderWriterProcessor.Process(moduleDefinition, writers, readers, ref WeavingFailed);
210+
modified |= QSBReaderWriterProcessor.Process(moduleDefinition, writers, readers, ref WeavingFailed);
211211

212212
modified |= WeaveModule(moduleDefinition);
213213

QSB/Anglerfish/TransformSync/AnglerTransformSync.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using QSB.Anglerfish.WorldObjects;
2-
using QSB.AuthoritySync;
2+
using QSB.OwnershipSync;
33
using QSB.Syncs.Unsectored.Rigidbodies;
44
using QSB.Utility.LinkedWorldObject;
55
using QSB.WorldSync;
@@ -22,7 +22,7 @@ public override void OnStartClient()
2222
{
2323
if (QSBCore.IsHost)
2424
{
25-
netIdentity.RegisterAuthQueue();
25+
netIdentity.RegisterOwnerQueue();
2626
}
2727

2828
base.OnStartClient();
@@ -32,7 +32,7 @@ public override void OnStopClient()
3232
{
3333
if (QSBCore.IsHost)
3434
{
35-
netIdentity.UnregisterAuthQueue();
35+
netIdentity.UnregisterOwnerQueue();
3636
}
3737

3838
base.OnStopClient();
@@ -48,7 +48,7 @@ protected override void Init()
4848

4949
AttachedRigidbody.OnUnsuspendOWRigidbody += OnUnsuspend;
5050
AttachedRigidbody.OnSuspendOWRigidbody += OnSuspend;
51-
netIdentity.UpdateAuthQueue(AttachedRigidbody.IsSuspended() ? AuthQueueAction.Remove : AuthQueueAction.Add);
51+
netIdentity.UpdateOwnerQueue(AttachedRigidbody.IsSuspended() ? OwnerQueueAction.Remove : OwnerQueueAction.Add);
5252
}
5353

5454
protected override void Uninit()
@@ -59,8 +59,8 @@ protected override void Uninit()
5959
AttachedRigidbody.OnSuspendOWRigidbody -= OnSuspend;
6060
}
6161

62-
private void OnUnsuspend(OWRigidbody suspendedBody) => netIdentity.UpdateAuthQueue(AuthQueueAction.Add);
63-
private void OnSuspend(OWRigidbody suspendedBody) => netIdentity.UpdateAuthQueue(AuthQueueAction.Remove);
62+
private void OnUnsuspend(OWRigidbody suspendedBody) => netIdentity.UpdateOwnerQueue(OwnerQueueAction.Add);
63+
private void OnSuspend(OWRigidbody suspendedBody) => netIdentity.UpdateOwnerQueue(OwnerQueueAction.Remove);
6464

6565
protected override void OnRenderObject()
6666
{

QSB/Anglerfish/WorldObjects/QSBAngler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class QSBAngler : LinkedWorldObject<AnglerfishController, AnglerTransform
1616
private Vector3 _lastTargetPosition;
1717

1818
protected override GameObject NetworkObjectPrefab => QSBNetworkManager.singleton.AnglerPrefab;
19-
protected override bool SpawnWithServerAuthority => false;
19+
protected override bool SpawnWithServerOwnership => false;
2020

2121
public override void SendInitialState(uint to) =>
2222
this.SendMessage(new AnglerDataMessage(this) { To = to });

QSB/Animation/Player/AnimationSync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void InitRemote(Transform body)
103103
private void InitAccelerationSync()
104104
{
105105
Player.JetpackAcceleration = GetComponent<JetpackAccelerationSync>();
106-
var thrusterModel = hasAuthority ? Locator.GetPlayerBody().GetComponent<ThrusterModel>() : null;
106+
var thrusterModel = isOwned ? Locator.GetPlayerBody().GetComponent<ThrusterModel>() : null;
107107
Player.JetpackAcceleration.Init(thrusterModel);
108108
}
109109

QSB/AssetBundles/qsb_hud

356 Bytes
Binary file not shown.

QSB/AuthoritySync/AuthorityManager.cs

Lines changed: 0 additions & 93 deletions
This file was deleted.

QSB/AuthoritySync/IAuthWorldObject_Extensions.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

QSB/EchoesOfTheEye/AlarmTotemSync/Patches/AlarmTotemPatches.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using HarmonyLib;
2-
using QSB.AuthoritySync;
32
using QSB.EchoesOfTheEye.AlarmTotemSync.Messages;
43
using QSB.EchoesOfTheEye.AlarmTotemSync.WorldObjects;
54
using QSB.Messaging;
5+
using QSB.OwnershipSync;
66
using QSB.Patches;
77
using QSB.Player;
88
using QSB.Utility;

0 commit comments

Comments
 (0)