mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix anglerfish speed
This commit is contained in:
parent
9905c2d10d
commit
784d654d3c
@ -83,6 +83,17 @@ namespace NewHorizons.Builder.Props
|
|||||||
foreach(var component in prop.GetComponents<SectoredMonoBehaviour>())
|
foreach(var component in prop.GetComponents<SectoredMonoBehaviour>())
|
||||||
{
|
{
|
||||||
component.SetSector(sector);
|
component.SetSector(sector);
|
||||||
|
if(component is AnglerfishController)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
(component as AnglerfishController)._chaseSpeed += OWPhysics.CalculateOrbitVelocity(go.GetAttachedOWRigidbody(), go.GetComponent<AstroObject>().GetPrimaryBody().GetAttachedOWRigidbody()).magnitude;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
Logger.LogError($"Couldn't update AnglerFish chase speed: {e.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach (var component in prop.GetComponentsInChildren<SectoredMonoBehaviour>())
|
foreach (var component in prop.GetComponentsInChildren<SectoredMonoBehaviour>())
|
||||||
{
|
{
|
||||||
@ -99,8 +110,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
if(enabledField != null && enabledField.FieldType == typeof(bool)) enabledField.SetValue(component, true);
|
if(enabledField != null && enabledField.FieldType == typeof(bool)) enabledField.SetValue(component, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//prop.transform.parent = go.transform;
|
prop.transform.position = position == null ? go.transform.position : go.transform.TransformPoint((Vector3)position);
|
||||||
prop.transform.localPosition = position == null ? Vector3.zero : (Vector3)position;
|
|
||||||
|
|
||||||
Quaternion rot = rotation == null ? Quaternion.identity : Quaternion.Euler((Vector3)rotation);
|
Quaternion rot = rotation == null ? Quaternion.identity : Quaternion.Euler((Vector3)rotation);
|
||||||
prop.transform.localRotation = rot;
|
prop.transform.localRotation = rot;
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
"author": "xen",
|
"author": "xen",
|
||||||
"name": "New Horizons",
|
"name": "New Horizons",
|
||||||
"uniqueName": "xen.NewHorizons",
|
"uniqueName": "xen.NewHorizons",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"owmlVersion": "2.1.0",
|
"owmlVersion": "2.1.0",
|
||||||
"dependencies": [ "PacificEngine.OW_CommonResources" ]
|
"dependencies": [ "PacificEngine.OW_CommonResources" ],
|
||||||
|
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "Vesper.OuterWildsMMO", "Vesper.AutoResume" ]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user