mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-04-15 20:42:33 +00:00
Merge pull request #192 from Raicuparta/nebula/small-fixes
Fix probe snapshot + cleanup
This commit is contained in:
commit
660c85eb03
@ -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;
|
||||
|
||||
@ -129,7 +129,7 @@ namespace QSB.Animation
|
||||
private void OnSuitUp() => SendTrigger(AnimTrigger.SuitUp);
|
||||
private void OnSuitDown() => SendTrigger(AnimTrigger.SuitDown);
|
||||
|
||||
private void SendTrigger(AnimTrigger trigger, float value = 0)
|
||||
public void SendTrigger(AnimTrigger trigger, float value = 0)
|
||||
{
|
||||
var message = new AnimTriggerMessage
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using QSB.Events;
|
||||
using QSB.Events;
|
||||
using System.Linq;
|
||||
|
||||
namespace QSB.DeathSync
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -10,7 +10,6 @@ namespace QSB
|
||||
public class PlayerInfo
|
||||
{
|
||||
public uint NetId { get; }
|
||||
public GameObject Body { get; set; }
|
||||
public GameObject Camera { get; set; }
|
||||
public GameObject ProbeBody { get; set; }
|
||||
public QSBProbe Probe { get; set; }
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using OWML.ModHelper.Events;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using OWML.ModHelper.Events;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
using System;
|
||||
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;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using OWML.ModHelper.Events;
|
||||
using OWML.ModHelper.Events;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.Tools
|
||||
|
@ -19,8 +19,6 @@ namespace QSB.TransformSync
|
||||
{
|
||||
var body = Locator.GetPlayerCamera().gameObject.transform;
|
||||
|
||||
PlayerToolsManager.Init(body);
|
||||
|
||||
Player.Camera = body.gameObject;
|
||||
|
||||
Player.IsReady = true;
|
||||
|
@ -9,7 +9,7 @@ namespace QSB.TransformSync
|
||||
|
||||
protected override uint PlayerIdOffset => 3;
|
||||
|
||||
public Transform bodyTransform;
|
||||
private Transform _disabledSocket;
|
||||
|
||||
public override void OnStartLocalPlayer()
|
||||
{
|
||||
@ -25,8 +25,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
var body = GetProbe();
|
||||
|
||||
bodyTransform = body;
|
||||
|
||||
_disabledSocket = Player.Camera.transform;
|
||||
Player.ProbeBody = body.gameObject;
|
||||
|
||||
return body;
|
||||
@ -44,8 +43,7 @@ namespace QSB.TransformSync
|
||||
|
||||
PlayerToolsManager.CreateProbe(body, Player);
|
||||
|
||||
bodyTransform = body;
|
||||
|
||||
_disabledSocket = Player.ProbeLauncher.ToolGameObject.transform;
|
||||
Player.ProbeBody = body.gameObject;
|
||||
|
||||
return body;
|
||||
@ -60,7 +58,7 @@ namespace QSB.TransformSync
|
||||
}
|
||||
if (hasAuthority)
|
||||
{
|
||||
transform.position = ReferenceSector.Transform.InverseTransformPoint(Player.ProbeLauncher.ToolGameObject.transform.position);
|
||||
transform.position = ReferenceSector.Transform.InverseTransformPoint(_disabledSocket.position);
|
||||
return;
|
||||
}
|
||||
if (SyncedTransform.position == Vector3.zero ||
|
||||
@ -68,7 +66,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
return;
|
||||
}
|
||||
SyncedTransform.localPosition = ReferenceSector.Transform.InverseTransformPoint(Player.ProbeLauncher.ToolGameObject.transform.position);
|
||||
SyncedTransform.localPosition = ReferenceSector.Transform.InverseTransformPoint(_disabledSocket.position);
|
||||
}
|
||||
|
||||
public override bool IsReady => Locator.GetProbe() != null && PlayerRegistry.PlayerExists(PlayerId) && Player.IsReady;
|
||||
|
@ -30,8 +30,6 @@ namespace QSB.TransformSync
|
||||
|
||||
GetComponent<AnimationSync>().InitLocal(body);
|
||||
|
||||
Player.Body = body.gameObject;
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
@ -44,8 +42,6 @@ namespace QSB.TransformSync
|
||||
var marker = body.gameObject.AddComponent<PlayerHUDMarker>();
|
||||
marker.Init(Player);
|
||||
|
||||
Player.Body = body.gameObject;
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using QSB.WorldSync;
|
||||
using QSB.WorldSync;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
|
@ -1,5 +1,5 @@
|
||||
using UnityEngine;
|
||||
using QSB.Events;
|
||||
using QSB.Events;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OWML.Common;
|
||||
|
||||
namespace QSB.Utility
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user