Skip to content

Commit

Permalink
Set warp to next morning a bit later
Browse files Browse the repository at this point in the history
  • Loading branch information
GER-Space committed May 3, 2018
1 parent bc6c699 commit ae56af2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion src/KerbalKonstructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1257,6 +1256,24 @@ public void LoadModels()
}
}

//foreach (Renderer renderer in model.prefab.GetComponentsInChildren<Renderer>(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);
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/CameraController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ae56af2

Please sign in to comment.