public void UpdateSystemBody(SystemLocation location, bool inSpace) { if (this.StarSystem != null) { if (!inSpace) { foreach (var body in this.StarSystem.SystemBodies) { if (location.GetInSystemDistance( SystemLocation.GetUpdatedLocation(body) ) <= (384403)) { this.SystemBody = body; break; } } } else { this.SystemBody = null; } } }