dont move probe back to launcher when it's retrieved. it actually looks better this way for non-player-launchers

This commit is contained in:
JohnCorby 2022-01-20 22:41:21 -08:00
parent c3422177ab
commit 840ce8119e
2 changed files with 1 additions and 34 deletions

View File

@ -70,7 +70,6 @@ namespace QSB.Syncs
protected abstract bool IsReady { get; }
protected abstract bool UseInterpolation { get; }
protected virtual bool AllowDisabledAttachedObject => false;
protected abstract bool AllowNullReferenceTransform { get; }
protected virtual bool IsPlayerObject => false;
protected virtual bool OnlyApplyOnDeserialize => false;
@ -177,7 +176,7 @@ namespace QSB.Syncs
return;
}
if (!AttachedTransform.gameObject.activeInHierarchy && !AllowDisabledAttachedObject)
if (!AttachedTransform.gameObject.activeInHierarchy)
{
return;
}

View File

@ -11,7 +11,6 @@ namespace QSB.Tools.ProbeTool.TransformSync
{
protected override float DistanceLeeway => 10f;
protected override bool UseInterpolation => true;
protected override bool AllowDisabledAttachedObject => true;
protected override bool IsPlayerObject => true;
public static PlayerProbeSync LocalInstance { get; private set; }
@ -63,37 +62,6 @@ namespace QSB.Tools.ProbeTool.TransformSync
return body;
}
protected override void GetFromAttached()
{
if (AttachedTransform.gameObject.activeInHierarchy)
{
base.GetFromAttached();
return;
}
var probeOWRigidbody = Locator.GetProbe().GetOWRigidbody();
if (probeOWRigidbody == null)
{
DebugLog.ToConsole($"Warning - Could not find OWRigidbody of local probe.", MessageType.Warning);
}
var probeLauncher = Player.LocalProbeLauncher;
// TODO : make this sync to the *active* probe launcher's _launcherTransform
var launcherTransform = probeLauncher._launcherTransform;
probeOWRigidbody.SetPosition(launcherTransform.position);
probeOWRigidbody.SetRotation(launcherTransform.rotation);
base.GetFromAttached();
var currentReferenceSector = ReferenceSector;
var playerReferenceSector = Player.TransformSync.ReferenceSector;
if (currentReferenceSector != playerReferenceSector)
{
SetReferenceSector(playerReferenceSector);
}
}
protected override bool IsReady => AttachedTransform != null || Locator.GetProbe() != null;
}
}