mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix orbit updater issue
This commit is contained in:
parent
7fd523743a
commit
a1e84d8152
@ -18,7 +18,7 @@ namespace NewHorizons.Builder.Updater
|
|||||||
public static void Update(NewHorizonsBody body, GameObject go)
|
public static void Update(NewHorizonsBody body, GameObject go)
|
||||||
{
|
{
|
||||||
var mapping = Planet.defaultMapping;
|
var mapping = Planet.defaultMapping;
|
||||||
var heavenlyBody = CommonResourcesUtilities.HeavenlyBodyFromAstroObject(AstroObjectLocator.GetAstroObject(body.Config.Name));
|
var heavenlyBody = CommonResourcesUtilities.HeavenlyBodyFromAstroObject(go.GetComponent<AstroObject>());
|
||||||
|
|
||||||
Logger.Log($"Updating position of {body.Config.Name}/{heavenlyBody}");
|
Logger.Log($"Updating position of {body.Config.Name}/{heavenlyBody}");
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,11 @@ namespace NewHorizons.Utility.CommonResources
|
|||||||
{
|
{
|
||||||
public static HeavenlyBody HeavenlyBodyFromAstroObject(AstroObject obj)
|
public static HeavenlyBody HeavenlyBodyFromAstroObject(AstroObject obj)
|
||||||
{
|
{
|
||||||
|
if(obj == null)
|
||||||
|
{
|
||||||
|
Logger.LogError("Asking for a heavenly body from astro object but it is null");
|
||||||
|
}
|
||||||
|
|
||||||
switch (obj.GetAstroObjectName())
|
switch (obj.GetAstroObjectName())
|
||||||
{
|
{
|
||||||
case AstroObject.Name.CustomString:
|
case AstroObject.Name.CustomString:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user