mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 03:40:54 +00:00
Alek's suggestions
This commit is contained in:
parent
1131715e1f
commit
f4984b1e9f
@ -30,12 +30,8 @@ namespace QSB.OrbSync
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (state)
|
||||
{
|
||||
WorldRegistry.RaiseEvent(InterfaceSlot, "OnSlotActivated");
|
||||
return;
|
||||
}
|
||||
WorldRegistry.RaiseEvent(InterfaceSlot, "OnSlotDeactivated");
|
||||
var ev = state ? "OnSlotActivated" : "OnSlotDeactivated";
|
||||
WorldRegistry.RaiseEvent(InterfaceSlot, ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ namespace QSB.TransformSync
|
||||
public NomaiInterfaceOrb AttachedOrb { get; private set; }
|
||||
public Transform OrbTransform { get; private set; }
|
||||
|
||||
private int Index => WorldRegistry.OrbSyncList.FindIndex(x => x == this);
|
||||
private int Index => WorldRegistry.OrbSyncList.IndexOf(this);
|
||||
|
||||
private const int MaxUpdatesBeforeDisable = 5;
|
||||
|
||||
@ -22,7 +22,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
WorldRegistry.OrbSyncList.Add(this);
|
||||
|
||||
QSB.Helper.Events.Unity.RunWhen(() => WorldRegistry.OldOrbList.Count != 0, OnReady);
|
||||
QSB.Helper.Events.Unity.RunWhen(() => WorldRegistry.OldOrbList.Count > 0, OnReady);
|
||||
}
|
||||
|
||||
private void OnReady()
|
||||
@ -75,6 +75,7 @@ namespace QSB.TransformSync
|
||||
}
|
||||
OrbTransform.position = _orbParent.TransformPoint(transform.position);
|
||||
OrbTransform.rotation = _orbParent.InverseTransformRotation(OrbTransform.rotation);
|
||||
|
||||
if (transform.localPosition == Vector3.zero)
|
||||
{
|
||||
_updateCount++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user