Ejemplo n.º 1
0
        public void Process()
        {
            //if (IsPlayerInsideVan && Game.IsControlJustPressed(GTA.Control.VehicleHandbrake))
            //    ToggleRampAnimation();

            if (doAnimation)
            {
                ProcessAnimation();
            }

            //Vehicle.Doors[VehicleDoorIndex.Trunk].AngleRatio = 0.71f;
            Vehicle.Doors[VehicleDoorIndex.Trunk].CanBeBroken = false;

            finalRamp.ProcessPropExistance();
            rampSupports.ProcessPropExistance();

            finalRamp.Prop.IsCollisionEnabled    = true;
            rampSupports.Prop.IsCollisionEnabled = true;

            if (cargoVehicle == null)
            {
                CheckForCargoVehicle();
            }
            else if (!IsCargoVehicleInside && Vehicle.Position.DistanceTo(cargoVehicle.Position) > 2.6f)
            {
                if (DeloreanHandler.IsVehicleATimeMachine(cargoVehicle))
                {
                    DeloreanHandler.GetTimeMachineFromVehicle(cargoVehicle).Circuits.GetHandler <FlyingHandler>().CanConvert = true;
                }

                cargoVehicle = null;
            }


            if (Game.IsControlJustPressed(GTA.Control.VehicleDuck))
            {
                if (IsCargoVehicleInside)
                {
                    if (IsPlayerInsideVan)
                    {
                        ToggleCargoVehicle();
                    }
                }
                else
                {
                    if (IsPlayerInsideCargo)
                    {
                        ToggleCargoVehicle();
                    }
                }
            }
        }