public void ApplyTo(TimeCircuits circuits) { circuits.Delorean.LastDisplacementCopy = LastDisplacementCopy; circuits.IsOn = IsOn; circuits.DestinationTime = DestinationTime; circuits.PreviousTime = PreviousTime; circuits.IsFueled = IsFueled; circuits.WasOnTracks = WasOnTracks; circuits.GetHandler <TimeTravelHandler>().CutsceneMode = CutsceneMode; circuits.IsRemoteControlled = IsRemoteControlled; circuits.Delorean.LastVelocity = LastVelocity; if (IsWarmedUp) { circuits.GetHandler <HoodboxHandler>().SetInstant(); } if (IsFlying) { circuits.FlyingHandler.SetFlyMode(true, true); } if (IsFreezing) { Function.Call(Hash.SET_VEHICLE_ENVEFF_SCALE, circuits.Vehicle, IceValue); circuits.IsFreezing = true; if (circuits.Delorean.Mods.Reactor == ReactorType.Nuclear) { circuits.IcePlaying = true; } } }
public TimeCircuitsCopy(TimeCircuits circuits, bool noLastDisplacementCopy = false) { if (!noLastDisplacementCopy) { LastDisplacementCopy = circuits.Delorean.LastDisplacementCopy; } IsOn = circuits.IsOn; DestinationTime = circuits.DestinationTime; PreviousTime = circuits.PreviousTime; IsFueled = circuits.IsFueled; WasOnTracks = circuits.WasOnTracks; IsWarmedUp = circuits.IsWarmedUp; IsFlying = circuits.IsFlying; CutsceneMode = circuits.GetHandler <TimeTravelHandler>().CutsceneMode; IsRemoteControlled = circuits.IsRemoteControlled; LastVelocity = circuits.Delorean.LastVelocity; IsFreezing = circuits.IsFreezing; if (IsFreezing) { IceValue = Function.Call <float>(Hash.GET_VEHICLE_ENVEFF_SCALE, circuits.Vehicle); } }