mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-19 12:40:56 +00:00
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:
parent
c3422177ab
commit
840ce8119e
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user