module Base
{
	model pzkM113_APC
	{
		mesh = vehicles/pzkM113|Base,
		shader = vehicle_norandom_multiuv,
		invertX = FALSE,
		invertY = TRUE,
		scale = 0.01,	
	}
	model pzkfake_wheel
	{
		mesh = vehicles/fake_wheel,
		texture = Vehicles/no_texture_tank,
		shader = vehiclewheel,
		invertX = FALSE,
		scale = 0.01,
	}
	model pzkM113_Turrent
	{
		mesh = vehicles/pzkM113_turret|Turrent,
		invertX = FALSE,
		shader = vehicle_noreflect,
		invertY = FALSE,
		scale = 0.01,
		static = FALSE,
		boneWeight = Bone_Base_Turrent 1.0,
	}
	model pzkM113_Machinegun
	{
		mesh = vehicles/pzkM113_turret|Turrent_M2,
		shader = vehicle_noreflect,
		invertX = FALSE,
		invertY = FALSE,
		scale = 0.01,
		static = FALSE,
		boneWeight = Bone_Cannon 1.0,
	}

	model pzkM113_Tire
	{
		mesh = vehicles/pzkM113_tracks|Tire,
		shader = vehicle_noreflect,
		scale = 0.01,
		static = FALSE,
		boneWeight = Bone_Base_Tire 1.0,
		boneWeight = Bone_Base_Tire1 1.0,
		boneWeight = Bone_Base_Tire2 1.0,
		boneWeight = Bone_Base_Tire3 1.0,
		boneWeight = Bone_Base_Tire4 1.0,
		boneWeight = Bone_Base_Tire5 1.0,
		boneWeight = Bone_Base_Tire6 1.0,

	}
	model pzkM113_Track_1
	{
		mesh = vehicles/pzkM113_tracks|Track_2,
		shader = vehicle_noreflect,
		scale = 0.01,
		static = FALSE,
		boneWeight = Bone_Base.070 1.0,
		boneWeight = Bone_Base.069 1.0,
		boneWeight = Bone_Base.068 1.0,
		boneWeight = Bone_Base.067 1.0,
		boneWeight = Bone_Base.066 1.0,
		boneWeight = Bone_Base.065 1.0,
		boneWeight = Bone_Base.064 1.0,
		boneWeight = Bone_Base.063 1.0,
		boneWeight = Bone_Base.062 1.0,
		boneWeight = Bone_Base.061 1.0,
		boneWeight = Bone_Base.060 1.0,
		boneWeight = Bone_Base.059 1.0,
		boneWeight = Bone_Base.058 1.0,
		boneWeight = Bone_Base.057 1.0,
		boneWeight = Bone_Base.056 1.0,
		boneWeight = Bone_Base.055 1.0,
		boneWeight = Bone_Base.054 1.0,
		boneWeight = Bone_Base.053 1.0,
		boneWeight = Bone_Base.052 1.0,
		boneWeight = Bone_Base.051 1.0,
		boneWeight = Bone_Base.050 1.0,
		boneWeight = Bone_Base.049 1.0,
		boneWeight = Bone_Base.048 1.0,
		boneWeight = Bone_Base.047 1.0,
		boneWeight = Bone_Base.046 1.0,
		boneWeight = Bone_Base.045 1.0,
		boneWeight = Bone_Base.044 1.0,
		boneWeight = Bone_Base.043 1.0,
		boneWeight = Bone_Base.042 1.0,
		boneWeight = Bone_Base.041 1.0,
		boneWeight = Bone_Base.040 1.0,
		boneWeight = Bone_Base.039 1.0,
		boneWeight = Bone_Base.038 1.0,
		boneWeight = Bone_Base.037 1.0,
		boneWeight = Bone_Base.036 1.0,
	}

	vehicle pzkM113_APC
	{
		mechanicType = 2,
		offRoadEfficiency = 100,
		engineRepairLevel = 8,
		playerDamageProtection = 0.8,
		zombieType = Generic01;Generic02;Generic03;Generic04;Generic05,
		engineRPMType = van,

		model
		{
			file = pzkM113_APC,
			scale = 0.9500,
			offset = 0.0000 -0.1368 0.0000,
			rotate = 0 180 0,
		}

		spawnOffsetY = 0.12999995,

		skin
		{
			texture = Vehicles/M113-WIP,
		}

		textureMask = Vehicles/M113_Mask,
		textureLights = Vehicles/M113_Lights,
		textureDamage1Overlay = Vehicles/no_texture_tank,
		textureDamage2Overlay = Vehicles/no_texture_tank,
		textureDamage1Shell = Vehicles/no_texture_tank,
		textureDamage2Shell = Vehicles/no_texture_tank,
		textureRust = Vehicles/M113_Rust,

		sound
		{
			engine = VehicleEngineOffRoad,
			engineStart = VehicleEngineOffRoad,
			engineTurnOff = VehicleEngineOffRoad,
			horn = VehicleHornJeep,
			ignitionFail = VehicleIgnitionFailOffRoad,
		}

		extents = 2.6947 2.1263 4.7789,
		mass = 1104,
		physicsChassisShape = 2.6947 2.1263 4.7789,
		centerOfMassOffset = 0.0000 1.0632 0.0000,
		shadowExtents = 2.6832 4.7882,
		shadowOffset = 0.0000 0.0000,
		engineForce = 5600,
		engineLoudness = 90,
		engineQuality = 90,
		maxSpeed = 25f,
		gearRatioCount = 1,
		gearRatioR = 5.5,
		gearRatio1 = 10.0,
		brakingForce = 80,
		stoppingMovementForce = 5.0f,
		rollInfluence = 0.7f,
		steeringIncrement = 1.04,
		steeringClamp = 1.3,
		suspensionStiffness = 50,
		suspensionCompression = 4.1,
		suspensionDamping = 3.4,
		maxSuspensionTravelCm = 20,
		suspensionRestLength = 0.2,
		wheelFriction = 1.8f,
		frontEndHealth = 5000,
		rearEndHealth = 3000,
		isSmallVehicle = false,
		seats = 8,

		wheel FrontLeft
		{
			front = true,
			offset = 1.0737 -0.0211 1.8632,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -1.1789 -0.0211 1.8632,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 1.0737 -0.0211 -1.9368,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -1.1789 -0.0211 -1.9368,
			radius = 0.15f,
			width = 0.2f,
		}

		area Engine
		{
			xywh = 0.0000 2.7053 1.8947 0.6316,
		}

		area TruckBed
		{
			xywh = -0.4105 -2.7053 1.4316 0.6316,
		}

		area SeatFrontLeft
		{
			xywh = 1.6632 1.0632 0.6316 0.6316,
		}

		area SeatFrontRight
		{
			xywh = -1.6632 0.0000 0.6316 0.6316,
		}

		area SeatRearLeft
		{
			xywh = 0.6211 -2.7053 0.6316 0.6316,
		}

		area GasTank
		{
			xywh = 1.6632 -1.8947 0.6316 0.6316,
		}

		area TireFrontLeft
		{
			xywh = 1.0947 1.6526 0.5053 0.5053,
		}

		area TireFrontRight
		{
			xywh = -1.0947 1.5474 0.5053 0.5053,
		}

		area TireRearLeft
		{
			xywh = 1.0947 -1.4000 0.5053 0.5053,
		}

		area TireRearRight
		{
			xywh = -1.0947 -1.3895 0.5053 0.5053,
		}
		
		template = TankTrack,

		part Track_2
		{
			category = tire,

			model Default
			{
				file = pzkM113_tracks,
				offset = 0.0000 0.0000 -0.3500,
				rotate = 0.0000 180.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Track_Anim
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Front_Slow
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 0.5,
			}

			anim Front_Normal
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 0.75,
			}

			anim Front_Fast
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 1.25,
			}

			anim Back_Slow
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 0.5,
			}

			anim Back_Normal
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 0.75,
			}

			anim Back_Fast
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 1.25,
			}

			lua
			{
				create = Vehicles.Create.TRACK,
				init = Vehicles.Init.TRACK,
				update = Vehicles.Update.TRACK,
			}
		}

		part Tire
		{
			category = nodisplay,

			model Default
			{
				file = pzkM113_Tire,
				offset = 0.0000 0.8000 -0.3500,
				rotate = 90.0000 90.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Track_Anim
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Front_Slow
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 0.5,
			}

			anim Front_Normal
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 0.75,
			}

			anim Front_Fast
			{
				anim = Track_Anim
				reverse = TRUE,
				loop = TRUE,
				rate = 1.25,
			}

			anim Back_Slow
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 0.5,
			}

			anim Back_Normal
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 0.75,
			}

			anim Back_Fast
			{
				anim = Track_Anim
				reverse = FALSE,
				loop = TRUE,
				rate = 1.25,
			}

			lua
			{
				create = Vehicles.Create.TRACK,
				init = Vehicles.Init.TRACK,
				update = Vehicles.Update.TRACK,
			}
		}

		template = TankMachinegun,

		part Browning_M2
		{
			itemType = Base.Browning_M2,
			mechanicRequireKey = false,
			category = Turrent,
			area = SeatFrontRight,
			parent = Turrent,

			model Default
			{
				file = pzkM113_Machinegun,
				offset = 0.0000 0.0000 0.1000,
				rotate = -90.0000 0.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Shooting,
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = FALSE,
				loop = FALSE,
				rate = 1.0,
			}

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 12,
				conditionAffectsCapacity = false,
			}

			table install
			{
				time = 600,
				skills = Mechanics:1,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.Default,
			}

			table uninstall
			{
				time = 600,
				skills = Mechanics:1,
				test = Vehicles.UninstallTest.MACHINEGUN,
				complete = Vehicles.UninstallComplete.Default,
			}

			lua
			{
				create = Vehicles.Create.MACHINEGUN,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}

		template = Turrent,

		part Turrent
		{
			model Default
			{
				file = pzkM113_Turrent,
				offset = 0.0000 0.0000 0.1000,
				rotate = -90.0000 0.0000 0.0000,
				scale = 1.0,
			}

			lua
			{
				create = Vehicles.Create.TORRENTA,
				init = Vehicles.Init.TORRENTA,
				update = Vehicles.Update.TORRENTA,
			}
		}
	}
}
