module Base
{
	model Vehicles_CadillacRangerSWATFBSP
	{
		mesh = vehicles/cadillacrangerswatFBSP,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 0.4519,
	}
	vehicle CadillacRangerSWATFBSP
    {
        mechanicType = 2,
        engineRepairLevel = 6,
        playerDamageProtection = 2.5,
        engineRPMType = van,
        offRoadEfficiency = 1.25,

        model
        {
            file = Vehicles_CadillacRangerSWATFBSP,
            scale = 1.9100,
            offset = 0.0000 0.2728 -0.3508,
        }

        spawnOffsetY = 0.30724707,

        skin
        {
            texture = Vehicles/CadillacrangerSWAT,
        }

        lightbar
        {
            soundSiren = VehicleSiren,
            leftCol = 0;0;1,
            rightCol = 1;0;0,
        }

        textureMask = Vehicles/CadillacrangerSWAT_mask,
        textureLights = Vehicles/CadillacrangerSWAT_lights,
        textureDamage1Overlay = Vehicles/CadillacrangerSWAT_Damage1,
        textureDamage2Overlay = Vehicles/CadillacrangerSWAT_Damage2,
        textureDamage1Shell = Vehicles/CadillacrangerSWAT_Damage1,
        textureDamage2Shell = Vehicles/CadillacrangerSWAT_Damage2,
        textureRust = Vehicles/CadillacrangerSWAT_rust,

        sound
        {
            engine = VehicleEngineSUV,
            engineStart = VehicleEngineSUV,
            engineTurnOff = VehicleEngineSUV,
            horn = TruckHornSoundEffect,
            ignitionFail = VehicleIgnitionFailSUV,
        }

        extents = 0.9948 0.8796 2.8482,
        shadowOffset = 0.0000 -0.0378,
        mass = 800,
        physicsChassisShape = 0.9948 0.9738 3.0890,
        centerOfMassOffset = 0.0000 0.5497 -0.2723,
        shadowExtents = 0.8811 2.7243,
        engineForce = 5200,
        maxSpeed = 90f,
        engineLoudness = 130,
        engineQuality = 75,
        brakingForce = 80,
        gearRatioCount = 4,
        gearRatioR = 4.7,
        gearRatio1 = 4.6,
        gearRatio2 = 3.2,
        gearRatio3 = 1.3,
        gearRatio4 = 1.0,
        stoppingMovementForce = 4.0f,
        rollInfluence = 1.0f,
        steeringIncrement = 0.04,
        steeringClamp = 0.3,
        suspensionStiffness = 30,
        suspensionCompression = 3.83,
        suspensionDamping = 2.88,
        maxSuspensionTravelCm = 12,
        suspensionRestLength = 0.15f,
        wheelFriction = 1.8f,
        frontEndHealth = 150,
        rearEndHealth = 150,
        seats = 4,

        wheel FrontLeft
        {
            front = true,
            offset = 0.3455 -0.2618 1.0105,
            radius = 0.12f,
            width = 0.2f,
        }

        wheel FrontRight
        {
            front = true,
            offset = -0.3455 -0.2618 1.0105,
            radius = 0.12f,
            width = 0.2f,
        }

        wheel RearLeft
        {
            front = false,
            offset = 0.3455 -0.2618 -0.6073,
            radius = 0.12f,
            width = 0.2f,
        }

        wheel RearRight
        {
            front = false,
            offset = -0.3455 -0.2618 -0.6073,
            radius = 0.12f,
            width = 0.2f,
        }

        template = PassengerSeat4,

        passenger FrontLeft
        {
            position inside
            {
                offset = 0.1780 -0.1466 -0.0209,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 0.6492 -0.4660 0.2199,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }
        }

        passenger FrontRight
        {
            position inside
            {
                offset = -0.1780 -0.1466 0.0209,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -0.6492 -0.4660 0.2199,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }
        }

        passenger RearLeft
        {
            position inside
            {
                offset = 0.1780 -0.1466 -0.3979,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 0.6492 -0.4660 -0.2565,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatRearLeft,
            }
        }

        passenger RearRight
        {
            position inside
            {
                offset = -0.1780 -0.1466 -0.3979,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -0.6492 -0.4660 -0.2565,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatRearRight,
            }
        }

        area Engine
        {
            xywh = 0.0000 1.2670 0.9634 0.4817,
        }

        area TruckBed
        {
            xywh = 0.0000 -1.3717 1.2565 0.4817,
        }

        area SeatFrontLeft
        {
            xywh = 0.6283 -0.2251 0.4817 0.4817,
        }

        area SeatFrontRight
        {
            xywh = -0.6283 -0.2251 0.4817 0.4817,
        }

        area SeatRearLeft
        {
            xywh = 0.2356 -1.8639 0.4817 0.4817,
        }

        area SeatRearRight
        {
            xywh = -0.2461 -1.8691 0.4817 0.4817,
        }

        area GasTank
        {
            xywh = 0.6283 -1.0628 0.4817 0.4817,
        }

        area TireFrontLeft
        {
            xywh = 0.6283 0.6702 0.4817 0.4817,
        }

        area TireFrontRight
        {
            xywh = -0.6283 0.6702 0.4817 0.4817,
        }

        area TireRearLeft
        {
            xywh = 0.6283 -1.0000 0.4817 0.4817,
        }

        area TireRearRight
        {
            xywh = -0.6283 -1.0000 0.4817 0.4817,
        }

        template = TrunkDoor,

        part TrunkDoor
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Trunk/part/TruckBed,
        template = Seat/part/SeatFrontLeft,
        template = Seat/part/SeatFrontRight,
        template = Seat/part/SeatRearLeft,
        template = Seat/part/SeatRearRight,

        part TruckBed
        {
            itemType = Base.FRCargoTrunkSEV,
        }

        part Seat*
        {
            table install
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
        }

        template = GloveBox,
        template = GasTank,

        part GasTank
        {
            install
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }

            uninstall
            {
                skills = Mechanics:7,
                recipes = Intermediate Mechanics,
            }
        }

        template = Battery,
        template = Engine,
        template = Muffler,

        part Muffler
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = EngineDoor,

        part EngineDoor
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        part Heater
        {
            category = engine,

            lua
            {
                update = Vehicles.Update.Heater,
            }
        }

        part PassengerCompartment
        {
            category = nodisplay,

            lua
            {
                update = Vehicles.Update.PassengerCompartment,
            }
        }

        template = Windshield/part/Windshield,
        template = Windshield/part/WindshieldRear,

        part Windshield*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Window/part/WindowFrontLeft,
        template = Window/part/WindowFrontRight,
        template = Window/part/WindowRearLeft,
        template = Window/part/WindowRearRight,

        part Window*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Door/part/DoorFrontLeft,
        template = Door/part/DoorFrontRight,
        template = Door/part/DoorRearLeft,
        template = Door/part/DoorRearRight,

        part Door*
        {
            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }
        }

        template = Tire,

        part Tire*
        {
            model InflatedTirePlusWheel
            {
                file = Vehicles_WheelFROR1SEV,
            }
        }

        template = Brake,

        part Brake*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = Suspension,

        part Suspension*
        {
            table install
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:6,
                recipes = Intermediate Mechanics,
            }
        }

        template = Radio_HAM,
        template = Headlight,

        physics box
        {
            offset = 0.0000 0.1885 -0.2317,
            extents = 0.9529 0.3560 3.0052,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.6335 -0.2812,
            extents = 0.9529 0.5236 1.5812,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.4385 1.2147,
            extents = 0.8691 0.1257 0.5236,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.5923 0.7120,
            extents = 0.8586 0.5236 0.1361,
            rotate = -50.0000 0.0000 0.0000,
        }

        attachment trailer
        {
            offset = 0.0000 -0.2757 -1.4170,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = -1.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 -0.2757 1.6248,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = 1.0000,
        }
    }
}
