mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
stuff
This commit is contained in:
parent
191396bfa4
commit
2c02a361ca
@ -21,7 +21,7 @@ namespace QSB.Animation.Player.Thrusters
|
||||
|
||||
// TODO : Make flames not appear underwater (Check original code!)
|
||||
|
||||
public void InitFromOld(Thruster thruster, Light light, AnimationCurve scaleByThrust, DampedSpring scaleSpring, float belowMaxThrustScalar, PlayerInfo player)
|
||||
public void InitFromOld(Thruster thruster, Light light, AnimationCurve scaleByThrust, DampedSpring scaleSpring, float belowMaxThrustScalar, float baseLightRadius, PlayerInfo player)
|
||||
{
|
||||
_thruster = thruster;
|
||||
_light = light;
|
||||
@ -29,6 +29,7 @@ namespace QSB.Animation.Player.Thrusters
|
||||
_scaleSpring = scaleSpring;
|
||||
_belowMaxThrustScalar = belowMaxThrustScalar;
|
||||
_attachedPlayer = player;
|
||||
_baseLightRadius = baseLightRadius;
|
||||
_isReady = true;
|
||||
}
|
||||
|
||||
@ -36,7 +37,6 @@ namespace QSB.Animation.Player.Thrusters
|
||||
{
|
||||
_thrusterRenderer = GetComponent<MeshRenderer>();
|
||||
_thrusterFilter = OWUtilities.GetShipThrusterFilter(_thruster);
|
||||
_baseLightRadius = _light.range;
|
||||
_currentScale = 0f;
|
||||
_thrusterRenderer.enabled = false;
|
||||
_light.enabled = false;
|
||||
|
@ -51,9 +51,10 @@ namespace QSB.Animation.Player.Thrusters
|
||||
var oldAnimCurve = controller.GetValue<AnimationCurve>("_scaleByThrust");
|
||||
var oldScaleSpring = controller.GetValue<DampedSpring>("_scaleSpring");
|
||||
var oldScalar = controller.GetValue<float>("_belowMaxThrustScalar");
|
||||
var oldBase = controller.GetValue<float>("_baseLightRadius");
|
||||
Object.Destroy(controller);
|
||||
var newObj = gameObject.AddComponent<RemoteThrusterFlameController>();
|
||||
newObj.InitFromOld(oldThruster, oldLight, oldAnimCurve, oldScaleSpring, oldScalar, player);
|
||||
newObj.InitFromOld(oldThruster, oldLight, oldAnimCurve, oldScaleSpring, oldScalar, oldBase, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,18 @@ namespace QSB.OrbSync.TransformSync
|
||||
SetReferenceTransform(AttachedObject.GetAttachedOWRigidbody().GetOrigParent());
|
||||
}
|
||||
|
||||
protected override GameObject InitLocalTransform() => QSBWorldSync.OldOrbList[_index].gameObject;
|
||||
protected override GameObject InitRemoteTransform() => QSBWorldSync.OldOrbList[_index].gameObject;
|
||||
private GameObject GetTransform()
|
||||
{
|
||||
if (QSBWorldSync.OldOrbList == null || QSBWorldSync.OldOrbList.Count <= _index)
|
||||
{
|
||||
DebugLog.ToConsole($"Error - OldOrbList is null or does not contain index {_index}.", OWML.Common.MessageType.Error);
|
||||
return null;
|
||||
}
|
||||
return QSBWorldSync.OldOrbList[_index].gameObject;
|
||||
}
|
||||
|
||||
protected override GameObject InitLocalTransform() => GetTransform();
|
||||
protected override GameObject InitRemoteTransform() => GetTransform();
|
||||
|
||||
public override bool IsReady => _isReady;
|
||||
public override bool UseInterpolation => false;
|
||||
|
@ -63,7 +63,6 @@ namespace QSB.QuantumSync.WorldObjects
|
||||
var visibilityTrackers = AttachedObject.GetValue<VisibilityTracker[]>("_visibilityTrackers");
|
||||
if (visibilityTrackers == null || visibilityTrackers.Length == 0)
|
||||
{
|
||||
DebugLog.ToConsole($"Warning - {AttachedObject.name} has null visibility trackers!", MessageType.Warning);
|
||||
return new List<Shape>();
|
||||
}
|
||||
if (visibilityTrackers.Any(x => x.GetType() == typeof(RendererVisibilityTracker)))
|
||||
|
@ -32,6 +32,10 @@ namespace QSB.Syncs.TransformSync
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
if (!QSBSectorManager.Instance.IsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var closestSector = SectorSync.GetClosestSector(AttachedObject.transform);
|
||||
if (closestSector != null)
|
||||
{
|
||||
|
@ -4,6 +4,6 @@
|
||||
"name": "Quantum Space Buddies",
|
||||
"description": "Adds online multiplayer to the game.",
|
||||
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
|
||||
"version": "0.10.1",
|
||||
"version": "0.11.0",
|
||||
"owmlVersion": "1.1.8"
|
||||
}
|
Loading…
Reference in New Issue
Block a user