module Base
{
	model 92amgeneralM998Base
	{
		mesh = vehicles/Vehicles_92amgeneralM998_Body|HMMWV_body,
		shader = damn_vehicle_noreflect_shader,
		scale = 0.1,
	}
	model 92amgeneralM998interior
	{
		mesh = vehicles/Vehicles_92amgeneralM998_Body|HMMWV_body_interior,
		texture = Vehicles/Vehicles_92amgeneralM998_Interior_Wheel,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	model 92amgeneralM998radio
	{
		mesh = vehicles/Vehicles_92amgeneralM998_Body|HMMWV_radio,
		shader = damn_vehicle_noreflect_shader,
		scale = 0.1,
	}
	model 92amgeneralM998battery
	{
		mesh = vehicles/Vehicles_92amgeneralM998_Body|TIS_CarBattery,
		shader = damn_vehicle_noreflect_shader,
		scale = 0.1,
	}
	vehicle 92amgeneralM998
    {
        mechanicType = 2,
        offRoadEfficiency = 1.20,
        engineRepairLevel = 4,
        playerDamageProtection = 1.3,

        model
        {
            file = 92amgeneralM998Base,
            scale = 0.9000,
            offset = 0.0000 0.7111 0.0000,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_USMCgreen,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_NATOgreen,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_DesertTan,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_camo,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_camoCombo,
        }

        skin
        {
            texture = Vehicles/Vehicles_92amgeneralM998_Shell_black,
        }

        textureRust = Vehicles/92amgeneralM998_rust,
        textureMask = Vehicles/92amgeneralM998_mask,
        textureLights = Vehicles/92amgeneralM998_lights,
        textureDamage1Shell = Vehicles/92amgeneralM998_damage,
        textureDamage2Shell = Vehicles/92amgeneralM998_damage2,
        textureDamage1Overlay = Vehicles/92amgeneralM998_blood,
        textureDamage2Overlay = Vehicles/92amgeneralM998_blood,

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

        extents = 2.2222 1.4000 4.6222,
        mass = 850,
        physicsChassisShape = 2.2222 1.4000 4.6222,
        centerOfMassOffset = 0.0000 0.8889 0.0778,
        shadowExtents = 2.2540 4.9926,
        shadowOffset = -0.0032 0.1301,
        engineForce = 4451,
        gearRatioCount = 4,
        gearRatioR = 14.4,
        gearRatio1 = 13.3,
        gearRatio2 = 9.6,
        gearRatio3 = 5.93,
        gearRatio4 = 3.94,
        maxSpeed = 85f,
        engineLoudness = 100,
        engineQuality = 80,
        brakingForce = 55,
        stoppingMovementForce = 4.0f,
        rollInfluence = 0.97f,
        steeringIncrement = 0.04,
        steeringClamp = 0.3,
        suspensionStiffness = 39,
        suspensionCompression = 3.83,
        suspensionDamping = 2.88,
        maxSuspensionTravelCm = 14,
        suspensionRestLength = 0.20f,
        wheelFriction = 1.4f,
        frontEndHealth = 1500,
        rearEndHealth = 1350,
        seats = 4,

        wheel FrontLeft
        {
            front = true,
            offset = 0.9111 -0.6333 1.8333,
            radius = 0.42f,
            width = 0.27f,
        }

        wheel FrontRight
        {
            front = true,
            offset = -0.9111 -0.6333 1.8333,
            radius = 0.42f,
            width = 0.27f,
        }

        wheel RearLeft
        {
            front = false,
            offset = 0.9111 -0.6778 -1.3778,
            radius = 0.42f,
            width = 0.27f,
        }

        wheel RearRight
        {
            front = false,
            offset = -0.9111 -0.6778 -1.3778,
            radius = 0.42f,
            width = 0.27f,
        }

        template = PassengerSeat4,

        passenger FrontLeft
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = 0.6889 -0.0667 0.2556,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 1.4222 -1.0556 -0.0667,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }
        }

        passenger FrontRight
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = -0.6889 -0.0667 0.2333,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -1.4667 -1.0556 -0.0556,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }
        }

        passenger RearLeft
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = 0.6889 -0.0667 -0.6000,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 1.4111 -0.9778 -0.6778,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatRearLeft,
            }
        }

        passenger RearRight
        {
            showPassenger = true,
            hasRoof = true,

            position inside
            {
                offset = -0.6889 -0.0667 -0.6000,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -1.4222 -0.9778 -0.6222,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatRearRight,
            }
        }

        area Engine
        {
            xywh = 1.5000 1.7889 0.7778 1.0000,
        }

        area TruckBed
        {
            xywh = 0.0000 -2.5667 1.3778 0.6667,
        }

        area Roofrack
        {
            xywh = 0.0000 -0.9333 3.2222 3.7111,
        }

        area SpareTire
        {
            xywh = -0.3222 -3.0000 0.4222 0.4222,
        }

        area Mudflaps
        {
            xywh = 0.4778 -2.6889 0.4222 0.4222,
        }

        area SeatFrontLeft
        {
            xywh = 1.5000 0.3889 0.7778 0.7778,
        }

        area SeatFrontRight
        {
            xywh = -1.5000 0.3889 0.7778 0.7778,
        }

        area SeatRearRight
        {
            xywh = -1.5000 -0.3778 0.7778 0.7333,
        }

        area SeatRearLeft
        {
            xywh = 1.5000 -0.3778 0.7778 0.7333,
        }

        area GasTank
        {
            xywh = -1.3222 -1.0222 0.4222 0.4222,
        }

        area TireFrontLeft
        {
            xywh = 1.6111 1.7778 0.4222 0.4222,
        }

        area TireFrontRight
        {
            xywh = -1.6111 1.7778 0.4222 0.4222,
        }

        area TireRearLeft
        {
            xywh = 1.6111 -1.4444 0.4222 0.4222,
        }

        area TireRearRight
        {
            xywh = -1.6111 -1.4444 0.4222 0.4222,
        }

        template = runFlatTires,
        template = centralTireInflation,
        template = M998TrunkCompartment,
        template = M998RoofrackCompartment,
        template = M998SpareTire,
        template = M998Mudflaps,
        template = M998TrunkDoor,
        template = M998TrunkBarriers,
        template = M998BackCovers,
        template = M998Seats,
        template = M998Mufflers,
        template = M998EngineDoor,
        template = M998Doors,
        template = M998Armor,
        template = M998Bumpers,
        template = M998Tires,
        template = DAMNGunrack,

        part GloveBox
        {
            model InteriorM998
            {
                file = 92amgeneralM998interior,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1.0,
            }

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

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

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

        template = GasTank,

        part GasTank
        {
            container
            {
                conditionAffectsCapacity = false,
                capacity = 95,
            }

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

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

        template = Battery,

        part Battery
        {
            model M998BatteryTIS
            {
                file = 92amgeneralM998battery,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1.0,
            }
        }

        template = Engine,

        part Heater
        {
            category = engine,

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

        part PassengerCompartment
        {
            category = nodisplay,

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

        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,

        part Radio
        {
            model Default
            {
                file = 92amgeneralM998radio,
                offset = 0.0000 0.0000 0.0000,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1.0,
            }
        }

        template = Headlight,
        template = M998Windshield,
        template = M998Windows,
        template = DAMNglobal,
        template = DAMN92amgeneralM998,
        useChassisPhysicsCollision = false,

        physics box
        {
            offset = 0.0000 0.6000 0.0883,
            extents = 2.1333 0.8222 4.4667,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 1.2778 0.0883,
            extents = 2.1333 0.5333 1.7111,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 1.0779 -1.3778,
            extents = 2.1333 0.4889 1.4667,
            rotate = -19.0000 0.0000 0.0000,
        }

        attachment trailer
        {
            offset = 0.0000 -0.3000 -2.3222,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = -1.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 -0.3000 2.5333,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = 1.0000,
        }
    }
}
