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(); } }
public void RecordMaxSpeed() { if (FlightGlobals.ActiveVessel == null) { return; } LaunchEvent activeLaunch = GetLaunch(FlightGlobals.ActiveVessel); if (activeLaunch != null) { MaxSpeedEvent maxSpEv = new MaxSpeedEvent(); maxSpEv.speed = activeLaunch.maxSpeed; if (activeLaunch.GetEventMaxSpeed() < activeLaunch.maxSpeed) { activeLaunch.AddEvent(maxSpEv); } } }