module Base
{
	model 82oshkoshM911Base
	{
		mesh = vehicles/Vehicles_82oshkoshM911_mk3_Body|m911_body,
		shader = vehicle_norandom_multiuv_noreflect,
		invertX = FALSE,
		scale = 0.1,
	}
	model 82oshkoshM911Interior
	{
		mesh = vehicles/Vehicles_82oshkoshM911_mk3_Body|m911_interior,
		texture = vehicles/Vehicles_82oshkoshM911_Interior_Wheel,
		shader = damn_wheel_shader,
		invertX = FALSE,
		scale = 0.1,
	}
	model 82oshkoshM911TISBattery
	{
		mesh = vehicles/Vehicles_82oshkoshM911_mk3_Body|TIS_CarBattery,
		texture = vehicles/Vehicles_82oshkoshM911_Interior_Wheel,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	model 82oshkoshM911Gastank
	{
		mesh = vehicles/Vehicles_82oshkoshM911_mk3_Body|m911_gastank,
		shader = vehicle_norandom_multiuv_noreflect,
		invertX = FALSE,
		scale = 0.1,
	}
	vehicle 82oshkoshM911
    {
        mechanicType = 2,
        offRoadEfficiency = 1.2,
        engineRepairLevel = 4,
        playerDamageProtection = 1.3,

        model
        {
            file = 82oshkoshM911Base,
            scale = 0.9000,
            offset = 0.0000 0.7667 0.0000,
        }

        skin
        {
            texture = Vehicles/Vehicles_82oshkoshM911_Shell_USMCgreen,
        }

        skin
        {
            texture = Vehicles/Vehicles_82oshkoshM911_Shell_NATOgreen,
        }

        skin
        {
            texture = Vehicles/Vehicles_82oshkoshM911_Shell_DesertTan,
        }

        skin
        {
            texture = Vehicles/Vehicles_82oshkoshM911_Shell_WoodlandCamo,
        }

        textureRust = Vehicles/Vehicles_82oshkoshM911_Rust,
        textureMask = Vehicles/Vehicles_82oshkoshM911_Mask,
        textureLights = Vehicles/Vehicles_82oshkoshM911_Lights,
        textureDamage1Overlay = Vehicles/Vehicles_82oshkoshM911_Overlays_Damaged01,
        textureDamage2Overlay = Vehicles/Vehicles_82oshkoshM911_Overlays_Damaged02,
        textureDamage1Shell = Vehicles/Vehicles_82oshkoshM911_Shell_Damaged01,
        textureDamage2Shell = Vehicles/Vehicles_82oshkoshM911_Shell_Damaged02,
        textureShadow = Vehicles/Vehicles_82oshkoshM911_Shadow,

        lightbar
        {
            soundSiren = VehicleSiren,
            leftCol = 1;0.73;0.2,
            rightCol = 1;0.73;0.2,
        }

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

        extents = 2.1333 0.5778 7.8667,
        mass = 980,
        physicsChassisShape = 2.1333 0.5778 7.8667,
        centerOfMassOffset = 0.0000 0.3667 0.1111,
        shadowExtents = 2.5490 8.6229,
        shadowOffset = 0.0000 0.1253,
        engineForce = 8001,
        maxSpeed = 60f,
        engineLoudness = 125,
        engineQuality = 85,
        brakingForce = 50,
        stoppingMovementForce = 12.0f,
        rollInfluence = 0.2f,
        steeringIncrement = 0.025,
        steeringClamp = 0.18,
        suspensionStiffness = 85,
        suspensionCompression = 4.83,
        suspensionDamping = 3.88,
        maxSuspensionTravelCm = 15,
        suspensionRestLength = 0.16f,
        wheelFriction = 2.5f,
        frontEndHealth = 2001,
        rearEndHealth = 1500,
        seats = 2,

        wheel FrontLeft
        {
            front = true,
            offset = 0.8889 -0.7333 2.6667,
            radius = 0.60f,
            width = 0.30f,
        }

        wheel FrontRight
        {
            front = true,
            offset = -0.8889 -0.7333 2.6667,
            radius = 0.60f,
            width = 0.30f,
        }

        wheel RearLeft
        {
            front = false,
            offset = 0.0000 -0.7778 -1.8111,
            radius = 0.60f,
            width = 2.22f,
        }

        wheel RearRight
        {
            front = false,
            offset = 0.0000 -0.8000 -3.1444,
            radius = 0.60f,
            width = 2.22f,
        }

        template = PassengerSeat2,

        passenger FrontLeft
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = 0.3000 0.5222 1.4444,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 1.6333 -1.0667 0.9667,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }
        }

        passenger FrontRight
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = -0.3111 0.5222 1.4556,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -1.5444 -1.0667 0.9667,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }
        }

        area Engine
        {
            xywh = -1.4556 3.2667 0.7778 1.4667,
        }

        area TruckBed
        {
            xywh = 1.4556 0.0889 0.7778 1.2667,
        }

        area SeatFrontLeft
        {
            xywh = 1.6667 1.4556 1.0000 1.0000,
        }

        area SeatFrontRight
        {
            xywh = -1.7000 1.4444 1.0000 1.0000,
        }

        area GasTank
        {
            xywh = -1.2667 1.4889 0.4000 0.4000,
        }

        area SpareTire
        {
            xywh = -1.2667 0.6222 0.4000 0.4000,
        }

        area TireFrontLeft
        {
            xywh = 1.4889 2.5778 0.4000 0.4000,
        }

        area TireFrontRight
        {
            xywh = -1.4889 2.5778 0.4000 0.4000,
        }

        area TireRearLeft
        {
            xywh = 1.6778 -1.2889 0.4000 0.4000,
        }

        area TireRearRight
        {
            xywh = -1.6778 -1.2889 0.4000 0.4000,
        }

        template = runFlatTires,
        template = centralTireInflation,
        template = airBrake,
        template = M911TrunkCompartment,
        template = TrunkDoor,
        template = M911Seats,
        template = M911EngineDoor,
        template = M911Bullbars,
        template = M911Doors,
        template = M911Armor,
        template = M911SpareTires,
        template = M911Mudflaps,
        template = M911Mufflers,
        template = M911TrunkDoor,
        template = DAMNGunrack,

        part GloveBox
        {
            area = SeatFrontRight,
            itemType = Base.GloveBox,
            mechanicRequireKey = true,

            model m911int
            {
                file = 82oshkoshM911Interior,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }

            container
            {
                capacity = 10,
                test = Vehicles.ContainerAccess.GloveBox,
            }

            lua
            {
                create = Vehicles.Create.Default,
            }
        }

        template = GasTank,

        part GasTank
        {
            model m911gastank
            {
                file = 82oshkoshM911Gastank,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }

            container
            {
                conditionAffectsCapacity = false,
                capacity = 90,
            }

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

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

        template = Battery,

        part Battery
        {
            model m911tisbat
            {
                file = 82oshkoshM911TISBattery,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
            }
        }

        template = Engine,

        part Heater
        {
            category = engine,

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

        part PassengerCompartment
        {
            category = nodisplay,

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

        template = TireV100A3,
        template = AxleV100A3,
        template = Brake,

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

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

        template = Suspension,

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

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

        template = Radio_HAM,
        template = M911Headlights,

        part HeadlightLeft
        {
            table uninstall
            {
                requireUninstalled = HeadlightRight,
            }
        }

        part Headlight*
        {
            table install
            {
                requireInstalled = DAMNBumperFront,
            }
        }

        template = M911Windows,
        template = DAMNglobal,
        template = DAMN82oshkoshM911,
        useChassisPhysicsCollision = false,

        physics box
        {
            offset = 0.0000 1.1111 1.7594,
            extents = 1.1889 0.9333 4.6333,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 1.8985 1.6778,
            extents = 1.5778 0.6444 1.1556,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.3541 0.1222,
            extents = 2.1333 0.5778 7.9111,
            rotate = 0.0000 0.0000 0.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 0.2444 -2.4444,
            rotate = 0.0000 0.0000 0.0000,
            updateconstraint = false,
        }

        attachment trailer
        {
            offset = 0.0000 -0.4556 -3.9778,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = -1.0000,
        }
    }
}
