public void RecordMaxGee() { if (FlightGlobals.ActiveVessel == null) { return; } LaunchEvent activeLaunch = GetLaunch(FlightGlobals.ActiveVessel); if (activeLaunch != null) { MaxGeeEvent maxGeeEv = new MaxGeeEvent(); maxGeeEv.gee = activeLaunch.maxGee; if (activeLaunch.maxGee > activeLaunch.GetEventMaxGee()) { activeLaunch.AddEvent(maxGeeEv); } foreach (ProtoCrewMember kerbal in FlightGlobals.ActiveVessel.GetVesselCrew()) { LaunchCrewEvent crewLaunch = GetKerbalLaunch(kerbal.name); if (crewLaunch.maxGee < activeLaunch.maxGee) { MaxGeeCrewEvent geeEv = new MaxGeeCrewEvent(); geeEv.gee = activeLaunch.maxGee; if (crewLaunch.GetEventMaxGee() < activeLaunch.maxGee) { crewLaunch.AddEvent(geeEv); } } } } }
internal void Revert() { bool removed = false; long currentTime = GetTimeInTicks(); if (currentTime <= 10000000) { return; } int removedCount = launches.RemoveAll(x => x.time > currentTime); foreach (var launch in launches) { removed = launch.Revert(currentTime); } removedCount += crewLaunches.RemoveAll(x => x.time > currentTime); foreach (var kerbal in crewLaunches) { removed = kerbal.Revert(currentTime) || removed; } if (FlightGlobals.ActiveVessel == null) { return; } LaunchEvent activeLaunch = GetLaunch(FlightGlobals.ActiveVessel); if (activeLaunch != null) { activeLaunch.maxSpeed = activeLaunch.GetEventMaxSpeed(); activeLaunch.maxGee = activeLaunch.GetEventMaxGee(); } }