Exemple #1
0
        private void OnReentryComplete()
        {
            Stop();

            _reentryTimer = 0;

            if (Main.PlayerVehicle == Vehicle)
            {
                TimeCircuits.GetHandler <SparksHandler>().StartTimeTravelCooldown();
            }

            if (TimeCircuits.WasOnTracks)
            {
                TimeCircuits.GetHandler <RailroadHandler>().StartDriving(true);
            }
            else
            {
                Vehicle.Velocity = TimeCircuits.Delorean.LastVelocity;

                if (MPHSpeed == 0)
                {
                    MPHSpeed = 88;
                }
            }

            if (!is99)
            {
                IsFueled = false;
            }

            if (!IsOnTracks && Vehicle.Driver == null)
            {
                Vehicle.SteeringAngle       = Utils.Random.NextDouble() >= 0.5f ? 35 : -35;
                Vehicle.IsHandbrakeForcedOn = true;
                Vehicle.Speed = Vehicle.Speed / 2;

                VehicleControl.SetBrake(Vehicle, 1f);
            }

            TimeCircuits.Delorean.IsInTime = false;

            TimeCircuits.GetHandler <FreezeHandler>().StartFreezeHandling(!is99);

            //Function.Call(Hash.SPECIAL_ABILITY_UNLOCK, Main.PlayerPed.Model);
            Function.Call(Hash.ENABLE_SPECIAL_ABILITY, Game.Player, true);
        }