remove the goofy ahh

This commit is contained in:
JohnCorby 2022-08-24 13:26:32 -07:00
parent 96052cba46
commit e9b22ac59f
4 changed files with 7 additions and 15 deletions

View File

@ -31,7 +31,7 @@ public partial class PlayerInfo
public bool IsInEyeShuttle { get; set; }
public IQSBQuantumObject EntangledObject { get; set; }
public QSBPlayerAudioController AudioController { get; set; }
public bool IsLocalPlayer => TransformSync?.isLocalPlayer == true;
public bool IsLocalPlayer => TransformSync.isLocalPlayer; // if TransformSync is ever null, i give permission for nebula to laugh at me - johncorby
public ThrusterLightTracker ThrusterLightTracker;
public bool FlyingShip => ShipManager.Instance.CurrentFlyer == PlayerId;
public bool WaitingForHeartbeat;

View File

@ -17,9 +17,9 @@ internal class ShipLegTransformSync : SectoredRigidbodySync, ILinkedNetworkBehav
protected override bool CheckReady()
=> base.CheckReady()
&& _qsbModule != null
&& _qsbModule.AttachedObject != null
&& _qsbModule.AttachedObject.isDetached;
&& _qsbModule != null // not sure how either of these can be null, but i guess better safe than sorry
&& _qsbModule.AttachedObject != null
&& _qsbModule.AttachedObject.isDetached;
protected override bool UseInterpolation => true;

View File

@ -17,9 +17,9 @@ internal class ShipModuleTransformSync : SectoredRigidbodySync, ILinkedNetworkBe
protected override bool CheckReady()
=> base.CheckReady()
&& _qsbModule != null
&& _qsbModule.AttachedObject != null
&& _qsbModule.AttachedObject.isDetached;
&& _qsbModule != null // not sure how either of these can be null, but i guess better safe than sorry
&& _qsbModule.AttachedObject != null
&& _qsbModule.AttachedObject.isDetached;
protected override bool UseInterpolation => true;

View File

@ -8,7 +8,6 @@ using QSB.Utility.Messages;
using QSB.WorldSync;
using System;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.InputSystem;
@ -227,13 +226,6 @@ public class DebugActions : MonoBehaviour, IAddComponentOnStart
DebugLog.DebugWrite($"CREATING FAKE PLAYER : {player}", MessageType.Info);
JoinLeaveSingularity.Create(player, true);
if (Keyboard.current[Key.LeftShift].isPressed)
{
// this is HORRIBLE TRASH, but it's just for testing
var field = typeof(PlayerInfo).GetField($"<{nameof(PlayerInfo.TransformSync)}>k__BackingField", BindingFlags.Instance | BindingFlags.NonPublic);
field.SetValue(player, null);
}
}
if (Keyboard.current[Key.Numpad9].wasPressedThisFrame)