This commit is contained in:
Mister_Nebula 2020-08-20 19:31:10 +01:00
parent 728baa1bcd
commit 274cf180c6
26 changed files with 48 additions and 53 deletions

View File

@ -1,9 +1,9 @@
using System;
using System.Linq;
using OWML.ModHelper.Events;
using OWML.ModHelper.Events;
using QSB.Events;
using QSB.Messaging;
using QSB.Utility;
using System;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;

View File

@ -1,5 +1,5 @@
using System.Linq;
using QSB.Events;
using QSB.Events;
using System.Linq;
namespace QSB.DeathSync
{

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Reflection.Emit;
using Harmony;
using Harmony;
using OWML.ModHelper.Events;
using System.Collections.Generic;
using System.Reflection.Emit;
using UnityEngine;
namespace QSB.DeathSync

View File

@ -1,6 +1,6 @@
using System.Linq;
using OWML.ModHelper.Events;
using OWML.ModHelper.Events;
using QSB.Events;
using System.Linq;
using UnityEngine;
namespace QSB.DeathSync

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
using QSB.WorldSync;
using System.Collections.Generic;
using System.Linq;
using QSB.WorldSync;
using UnityEngine;
namespace QSB.ElevatorSync

View File

@ -1,5 +1,4 @@
using OWML.ModHelper.Events;
using QSB.Utility;
using QSB.WorldSync;
using UnityEngine;

View File

@ -1,5 +1,4 @@
using QSB.Messaging;
using QSB.Utility;
namespace QSB.Events
{

View File

@ -1,5 +1,4 @@
using QSB.Messaging;
using QSB.Utility;
using UnityEngine.Networking;
namespace QSB.Events
@ -24,7 +23,7 @@ namespace QSB.Events
{
return;
}
QSB.Helper.Events.Unity.RunWhen(() => PlayerRegistry.GetTransformSync(message.AboutId) != null,
QSB.Helper.Events.Unity.RunWhen(() => PlayerRegistry.GetTransformSync(message.AboutId) != null,
() => PlayerRegistry.HandleFullStateMessage(message));
}

View File

@ -1,6 +1,5 @@
using QSB.Messaging;
using QSB.TransformSync;
using QSB.Utility;
namespace QSB.Events
{

View File

@ -23,7 +23,7 @@ namespace QSB.GeyserSync
WorldRegistry.AddObject(qsbGeyser);
}
}
public void EmptyUpdate()
{
QSB.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");

View File

@ -6,7 +6,7 @@ namespace QSB.Messaging
{
public uint FromId { get; set; }
public uint AboutId { get; set; }
public override void Deserialize(NetworkReader reader)
{
FromId = reader.ReadUInt32();

View File

@ -1,8 +1,8 @@
using System;
using System.Linq;
using QSB.Tools;
using QSB.Tools;
using QSB.TransformSync;
using QSB.Utility;
using System;
using System.Linq;
using UnityEngine;
namespace QSB

View File

@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
using QSB.TransformSync;
using QSB.Animation;
using QSB.Animation;
using QSB.Messaging;
using System;
using QSB.TransformSync;
using QSB.Utility;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace QSB
{

View File

@ -27,7 +27,7 @@ namespace QSB
{
Helper = ModHelper;
DebugLog.ToConsole($"* Start of QSB version {Helper.Manifest.Version} - authored by {Helper.Manifest.Author}", MessageType.Info);
NetworkAssetBundle = Helper.Assets.LoadBundle("assets/network");
DebugLog.OkayState("NetworkBundle", NetworkAssetBundle);
Patches.DoPatches();

View File

@ -1,6 +1,6 @@
using System;
using OWML.ModHelper.Events;
using System;
using System.Linq;
using OWML.ModHelper.Events;
using UnityEngine;
using UnityEngine.Networking;

View File

@ -1,13 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using QSB.Animation;
using QSB.Animation;
using QSB.DeathSync;
using QSB.Events;
using QSB.GeyserSync;
using QSB.TimeSync;
using QSB.TransformSync;
using QSB.Utility;
using System;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;
@ -116,7 +115,7 @@ namespace QSB
Destroy(GetComponent<PreventShipDestruction>());
EventList.Reset();
PlayerRegistry.PlayerList.ForEach(player => player.HudMarker?.Remove());
foreach (var player in PlayerRegistry.PlayerList.Where(x => x.NetId != PlayerRegistry.LocalPlayerId))
{
for (uint i = 0; i < QSB.NETWORK_OBJECT_COUNT; i++)

View File

@ -1,5 +1,5 @@
using System.Linq;
using OWML.ModHelper.Events;
using OWML.ModHelper.Events;
using System.Linq;
using UnityEngine;
namespace QSB.Tools
@ -28,7 +28,7 @@ namespace QSB.Tools
CreateFlashlight();
CreateSignalscope();
CreateProbeLauncher();
CreateTranslator();
CreateTranslator();
}
public static void CreateProbe(Transform body, PlayerInfo player)

View File

@ -9,12 +9,12 @@ namespace QSB.TransformSync
public static PlayerCameraSync LocalInstance { get; private set; }
protected override uint PlayerIdOffset => 2;
public override void OnStartLocalPlayer()
{
LocalInstance = this;
}
protected override Transform InitLocalTransform()
{
var body = Locator.GetPlayerCamera().gameObject.transform;

View File

@ -8,7 +8,7 @@ namespace QSB.TransformSync
public static PlayerProbeSync LocalInstance { get; private set; }
protected override uint PlayerIdOffset => 3;
public Transform bodyTransform;
public override void OnStartLocalPlayer()

View File

@ -43,7 +43,7 @@ namespace QSB.TransformSync
var transformSync = PlayerRegistry.GetTransformSync(message.AboutId);
QSB.Helper.Events.Unity.RunWhen(() => transformSync.SyncedTransform != null,
QSB.Helper.Events.Unity.RunWhen(() => transformSync.SyncedTransform != null,
() => transformSync.SetReferenceSector(sector));
}

View File

@ -10,7 +10,7 @@ namespace QSB.TransformSync
public string Name => Sector.name;
public Transform Transform => Sector.transform;
public Vector3 Position => Transform.position;
public void Init(Sector sector, int id)
{
Sector = sector;

View File

@ -1,5 +1,5 @@
using System.Linq;
using QSB.WorldSync;
using QSB.WorldSync;
using System.Linq;
using UnityEngine;
namespace QSB.TransformSync

View File

@ -1,5 +1,5 @@
using UnityEngine;
using QSB.Events;
using QSB.Events;
using UnityEngine;
namespace QSB.TransformSync
{

View File

@ -1,6 +1,6 @@
using System;
using OWML.Common;
using OWML.Common;
using QSB.Utility;
using System;
using UnityEngine;
using UnityEngine.Networking;
@ -96,7 +96,7 @@ namespace QSB.TransformSync
{
Show();
}
SyncedTransform.localPosition = Vector3.SmoothDamp(SyncedTransform.localPosition, transform.position, ref _positionSmoothVelocity, SmoothTime);
SyncedTransform.localRotation = QuaternionHelper.SmoothDamp(SyncedTransform.localRotation, transform.rotation, ref _rotationSmoothVelocity, Time.deltaTime);
}

View File

@ -1,7 +1,7 @@
using System;
using OWML.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using OWML.Common;
namespace QSB.Utility
{

View File

@ -15,7 +15,7 @@ namespace QSB.Utility
if (!____isRetrieving)
{
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
}
}
return true;
}