Esempio n. 1
0
        private void ApplyTo2(Vehicle vehicle, bool noOccupants)
        {
            vehicle.ThrottlePower = Throttle;
            vehicle.BrakePower    = Brake;
            VehicleControl.SetHandbrake(vehicle, Handbrake);
            vehicle.SteeringAngle  = SteeringAngle;
            vehicle.AreLightsOn    = Lights;
            vehicle.AreHighBeamsOn = Headlights;

            vehicle.HealthFloat         = Health;
            vehicle.EngineHealth        = EngineHealth;
            vehicle.Mods.PrimaryColor   = PrimaryColor;
            vehicle.Mods.SecondaryColor = SecondaryColor;
            vehicle.Mods.Livery         = Livery;

            vehicle.IsEngineRunning = EngineRunning;

            vehicle.CurrentRPM  = RPM;
            vehicle.CurrentGear = Gear;

            if (noOccupants)
            {
                return;
            }

            foreach (PedReplica pedReplica in Occupants)
            {
                pedReplica.Spawn(vehicle);
            }
        }