Add detectors to static bodies, just don't detect anything (#269)

Fixes #217
This commit is contained in:
Noah 2022-08-16 01:49:38 -04:00 committed by GitHub
commit 7ba252e548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -36,7 +36,7 @@ namespace NewHorizons.Builder.General
// Could copy the splash from the interloper as well some day // Could copy the splash from the interloper as well some day
} }
SetDetector(primaryBody, astroObject, forceDetector); if (!config.Orbit.isStatic) SetDetector(primaryBody, astroObject, forceDetector);
detectorGO.SetActive(true); detectorGO.SetActive(true);
return detectorGO; return detectorGO;

View File

@ -433,10 +433,7 @@ namespace NewHorizons.Handlers
Delay.FireOnNextUpdate(() => OrbitlineBuilder.Make(body.Object, ao as NHAstroObject, body.Config.Orbit.isMoon, body.Config)); Delay.FireOnNextUpdate(() => OrbitlineBuilder.Make(body.Object, ao as NHAstroObject, body.Config.Orbit.isMoon, body.Config));
} }
if (!body.Config.Orbit.isStatic) DetectorBuilder.Make(go, owRigidBody, primaryBody, ao, body.Config);
{
DetectorBuilder.Make(go, owRigidBody, primaryBody, ao, body.Config);
}
AstroObjectLocator.RegisterCustomAstroObject(ao); AstroObjectLocator.RegisterCustomAstroObject(ao);