From ae56af2cfcc6a9300f62370ac384d14fd120310a Mon Sep 17 00:00:00 2001 From: GER-Space Date: Thu, 3 May 2018 19:25:15 +0200 Subject: [PATCH] Set warp to next morning a bit later --- src/KerbalKonstructs.cs | 19 ++++++++++++++++++- src/Utilities/CameraController.cs | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/KerbalKonstructs.cs b/src/KerbalKonstructs.cs index 14e84194..1da1cbdb 100644 --- a/src/KerbalKonstructs.cs +++ b/src/KerbalKonstructs.cs @@ -886,7 +886,6 @@ public void LoadSquadKSCModels() if (facility.name.Equals("LaunchPad", StringComparison.CurrentCultureIgnoreCase)) { model.DefaultLaunchPadTransform = "LaunchPad_spawn"; - } // we reference only the original prefab, as we cannot instantiate an instance for some reason @@ -1257,6 +1256,24 @@ public void LoadModels() } } + //foreach (Renderer renderer in model.prefab.GetComponentsInChildren(true)) + //{ + // foreach (Material material in renderer.materials.Where(mat => mat.name == "ksc_exterior_terrain_grass_02 (Instance)")) + // { + // //Log.Normal("gras: " + material.name + " : " + material.color.ToString() + " : " + material.mainTexture.name); + // if (material.HasProperty("_SpecColor")) + // { + // material.SetColor("_SpecColor", new Color(0.5f, 0.5f, 0.5f, 0.5f)); + // } + + // if (material.HasProperty("_Shininess")) + // { + // material.SetFloat("_Shininess", 0.08f); + // } + + // } + //} + StaticDatabase.RegisterModel(model, modelName); // most mods will not load without beeing loaded here loadInstances(conf, model, false); diff --git a/src/Utilities/CameraController.cs b/src/Utilities/CameraController.cs index 0a83474c..41807111 100644 --- a/src/Utilities/CameraController.cs +++ b/src/Utilities/CameraController.cs @@ -230,7 +230,7 @@ internal static void SetSpaceCenterCam2(KKLaunchSite currentSite) static void SetNextMorningPoint(KKLaunchSite launchSite) { - double timeOfDawn = (((0.25 - launchSite.body.initialRotation / 360) - ((launchSite.refLon) / 360) + 1) % 1); + double timeOfDawn = (( 1.065* (0.25 - launchSite.body.initialRotation / 360) - ((launchSite.refLon) / 360) + 1) % 1); KSP.UI.UIWarpToNextMorning.timeOfDawn = (timeOfDawn + 0.05);