car
{
	name=Opel Astra 1.6 Lpg Kombi
	year=1996
	credits=Convert - M4tig|  Model - Mc-ceza DamianA
  	comments=1.6i Z podtlenkiem LPG
  	wheels=4
  	id=opel
  	version=063
  	shadow
  	{
    		texture=shadow.tga
    		width=2.7
    		length=5.6
    		offset_z=-0.06
  	}
  	cg
  	{
    		x=0
		;1380mm * 0.37 = 511mm, formula by IH8COPS
    		y=-0.173
		;52% / 48%
    		z=0.1664
  	}
  	ff_factor=0.35
}

abs
{
  	enable=1
	min_velocity=1.667
  	max_velocity_ratio=1.10
  	min_velocity_ratio=1.05
}

body
{
  	mass=1095
  	inertia
  	{
    		x=1740
    		y=1840
    		z=390
  	}
  	model
  	{
    		file=body.dof
  	}
  	model_incar
  	{
    		;file=
  	}
 	model_light_l
  	{
    		file=light.dof
  	}
 	model_light_r
  	{
    		;file=
  	}
  	model_braking_l
  	{
    		file=brake.dof
  	}
  	model_braking_r
  	{
    		;file=
  	}
  	width=1.645
  	height=1.190
  	length=4.325
  	manual_box=1
}

steer
{
  	x=0.356
  	y=0.095
  	z=0.73
  	radius=10
  	xa=20
	;BMW info 3.86 turns lock-to-lock
  	lock=1390
	;0.65 on 900° wheels, 0.26 on 180° wheels
  	linearity=0.15
  	model
  	{
    		file=Kierownica.dof
  	}
}

engine
{
  	mass=1
  	idle_rpm=870
  	max_rpm=6300
  	start_rpm=650
  	stall_rpm=300
  	autoclutch_rpm=1500
  	starter=1
  	starter_torque=50
  	start_stalled=0
  	curve_torque=Krzywa_momentu_obrotowego.crv
  	max_torque=1.00				;10% drivetrain torque loss.
  	torque_reaction=0.15
  	shifting
  	{
    		automatic=0
		fast=0
    		shift_up_rpm=4500
    		shift_down_rpm=2500
    		time_to_declutch=150
    		time_in_neutral=100
    		time_to_clutch=150
    		time_to_declutch_down=150
    		time_in_neutral_down=100
    		time_to_clutch_down=150
  	}
  	inertia
  	{
    		engine=0.29
  	}
  	braking_coeff=2.35
}

gearbox
{
	gears=6
  gear0
  {
    ratio=-3.33
    inertia=0.1
  }
  gear1
  {
    ratio=3.55
    inertia=0.08
  }
  gear2
  {
    ratio=2.16
    inertia=0.06
  }
  gear3
  {
    ratio=1.48
    inertia=0.04
  }
  gear4
  {
    ratio=1.13
    inertia=0.02
  }
  gear5
  {
    ratio=0.89
    inertia=0.01
  }
}

clutch
{
	max_torque=250
}

handbrakes
{
	wheels=23
}

differential
{
  	type=1
  	ratio=3.05
  	inertia=0.1
  	locking_coeff=0
  	output0=0
  	output1=1
}

aero
{
  	body
  	{
    		center=0 0 0
    		cx=0.29
    		area=2
  	}
  	wings=2
  	wing0
  	{
    		name=front lift
    		span=1.0
    		cord=1.0
    		coeff_drag=0.0
		;900N @ 248km/h?
   		coeff_down=-17.74
    		center=0.000 0.000 1.400
    		angle=0
    		angle_offset=1
  	}
  	wing1
  	{
    		name=rear lift
    		span=1.0
    		cord=1.0
    		coeff_drag=0.0
		;300N @ 248km/h?
   		coeff_down=-5.92
    		center=0.000 0.000 -1.170
    		angle=0
    		angle_offset=1
  	}
}

antirollbar
{
  	count=2
  	arb0
  	{
    		susp_left=0
    		susp_right=1
   		k=7000
  	}
  	arb1
  	{
    		susp_left=2
    		susp_right=3
    		k=7500
  	}
}

susp_front
{
  	y=-0.23
  	z=1.643
  	restlen=0.395
  	minlen=0.1									
  	maxlen=0.41
        bumpstop_len=0.04
        bumpstop_k=70000		
 	k=20000		
 	bump_rate=1000	
  	rebound_rate=1500	
  	bump_function=0
 	bump_max=1050
 	rebound_function=0
 	camber_change_per_m=0.00
  	roll_center
  	{
    		x=0
    		y=-0.652
    		z=0
  	}
}

susp0~susp_front
{
    	x=0.83
    	camber_change_steering=0.050
    	toe_change_per_m=-0.015
    
}
susp1~susp_front
{
    	x=-0.83
    	camber_change_steering=-0.050
    	toe_change_per_m=0.015
}

susp_rear
{
  	y=-0.27
  	z=-1.392
  	restlen=0.352		
 	minlen=0.13		
 	maxlen=0.38
        bumpstop_len=0.04
        bumpstop_k=70000										
  	k=19000		
  	bump_rate=1200	
  	rebound_rate=1500	
  	bump_function=0
  	bump_max=2250
  	rebound_function=0
  	camber_change_per_m=0.15
  	roll_center
  	{
    		x=0
    		y=-0.604
    		z=0
  	}
}

susp2~susp_rear
{
    	x=0.83
	;estimation based on Gustave's M3 site
    	toe_change_per_m=-0.016
}

susp3~susp_rear
{
    	x=-0.83
	;estimation based on Gustave's M3 site
    	toe_change_per_m=0.016
}

tire_model_front
{
	damping_predict_lat=0
  	damping_predict_long=0
}

tire_model_rear
{
  	damping_predict_lat=0
  	damping_predict_long=0
}

;0.78g skidpad, ~42m 100-0km/h 
pacejka
{
    	a0=1.25
    	a1=-35
    	a2=1300
    	a3=2000
    	a4=8
    	a5=0.015
    	a6=-0.25
    	a7=0.1
    	a8=-0.03
    	a9=-0.001
    	a10=-0.15
    	a111=-4.3
    	a112=-0.29
    	a12=17.8
    	a13=-2.4

    	b0=1.5
    	b1=-70
    	b2=1000 
    	b3=21
    	b4=325
    	b5=0.08
    	b6=0
    	b7=0.05
    	b8=-0.025
    	b9=0.015
    	b10=0.4
    	b11=-50
    	b12=0

    	c0=2.2
    	c1=-4
    	c2=-3
    	c3=-1
    	c4=-7
    	c5=0.0
    	c6=0.0
    	c7=0.044
    	c8=-0.58
    	c9=0.18
    	c10=0.043
    	c11=0.048
    	c12=-0.0035
    	c13=-0.18
    	c14=0.14
    	c15=-1.029
    	c16=0.27
    	c17=-1.1

    	optimal_slipratio=0.11
    	optimal_slipangle=0.157
}

wheel_front
{
	y=0
	z=0
	powered=1
  	steering=1
	reverse_steering=0
	lock=65.542
	mass=50
	inertia=0.9
	radius=0.33
	rolling_coeff=0.017
	friction_road=1
	max_braking=1100
	braking_factor=1
	inboard_brakes=0
	tire_rate=175000
	pacejka~pacejka
	{
	}
}

wheel0~wheel_front
{
  	x=0
	;-0.150°
  	toe=-0.078
	;-1.420° / -1.833°
  	camber=-0.044
    	model
  	{
    		file=Lewa.dof
		offset
		{
			x=-0.000
		}
  	}
    		model2
  	{
    		file=Lewa.dof
    		velocity=25345345
		offset
		{
			x=-0.000
		}
  	}
    		model3
  	{
    		file=Lewa.dof
    		velocity=45345
		offset
		{
			x=-0.000
		}
  	}
    		model_brake
  	{
    		;file=
  	}
}

wheel1~wheel_front
{
  	x=0
	;-0.150°
  	toe=-0.078
	;-1.420° / -1.833°
  	camber=-0.044
    	model
  	{
    		file=Prawa.dof
		offset
		{
			x=-0.000
		}
  	}
    		model2
  	{
    		file=Prawa.dof
    		velocity=2534534
		offset
		{
			x=-0.000
		}
  	}
    		model3
  	{
    		file=Prawa.dof
    		velocity=45345345
		offset
		{
			x=-0.000
		}
  	}
    		model_brake
  	{
    		;file=
  	}
}

wheel_rear
{
	y=0
	z=0
	powered=0
	steering=0
	mass=15
  	inertia=0.9
  	radius=0.33
  	rolling_coeff=0.015
  	friction_road=1
  	max_braking=270
  	max_handbrake_torque=1500
  	braking_factor=1
  	tire_rate=175000
  	pacejka~pacejka
  	{
		optimal_slipratio=0.11
		optimal_slipangle=0.155
	}
}

wheel2~wheel_rear
{
  	x=0
	;-0.150°
  	toe=-0.078
	;-1.420° / -1.833°
  	camber=-0.044
    	model
  	{
    		file=Lewa.dof
		offset
		{
			x=-0.000
		}
  	}
    		model2
  	{
    		file=Lewa.dof
    		velocity=2535345
		offset
		{
			x=-0.000
		}
  	}
    		model3
  	{
    		file=Lewa.dof
    		velocity=45345345
		offset
		{
			x=-0.000
		}
  	}
    		model_brake
  	{
    		;file=
  	}
}

wheel3~wheel_rear
{
  	x=0
	;0.150°
  	toe=0.078
	;-1.420° / -1.833°
  	camber=-0.044
    	model
  	{
    		file=Prawa.dof
		offset
		{
			x=-0.000
		}
  	}
    		model2
  	{
    		file=Prawa.dof
    		velocity=25345345
		offset
		{
			x=-0.000
		}
  	}
    		model3
  	{
    		file=Prawa.dof
    		velocity=45345345
		offset
		{
			x=-0.000
		}
  	}
    		model_brake
  	{
    		;file=
  	}
}

camera0
{
	name=Driver
	fov=68
	model=0
	view=1
	wheels=0
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0.35
		y=0.42
		z=0.15
	}
	offset_to
	{
		x=0
		y=0
		z=10
	}
	angle
	{
		x=0
		y=180
		z=0
	}
	src
	{
		mass=5
		k=750
		damping=75
		maxdist=0.2
	}
	dst
	{
		mass=1
		k=0
		damping=0
		maxdist=0
	}
}

camera1
{
  	name=Close Behind
  	fov=50
  	model=0
  	view=0
  	wheels=0
	offset
  	{
    		x=0
    		y=1.5
    		z=-5
  	}
  	angle
  	{
    		x=21
    		y=180
    		z=50
  	}
  	follow
  	{
    		pitch=0
    		yaw=1
    		roll=0
  	}
  	src
  	{
    		mass=1
    		k=200
    		damping=30
   		maxdist=1.5
  	}
  	dst
  	{
   		mass=1
    		k=150
    		damping=20
    		maxdist=1.5
  	}
}

camera2
{
	name=Chase
  	fov=45
  	model=0
  	view=0
  	wheels=0
   	offset
   	{
      		x=0.00
      		y=1.50
      		z=-6.00
   	}
   	angle
   	{
      		x=15.50
      		y=180.00
      		z=0.00
   	}
   	follow
   	{
      		pitch=0
      		yaw=1
      		roll=0
   	}
 	src
 	{
  		mass=5
  		k=50
  		damping=100
  		maxdist=2
 	}
	dst
	{
		mass=1
		k=0
		damping=0
		maxdist=0
	}
}

camera3
{
 	name=Hi-Speed Bumper Cam
 	fov=85
 	model=2
 	view=2
 	wheels=0
 	offset
 	{
  		x=0
  		y=0.15
  		z=2.1
 	}
 	angle
 	{
  		x=0
  		y=180
  		z=0
 	}
 	follow
 	{
  		pitch=1
  		yaw=1
  		roll=1
 	}
}

camera4
{
  	name=Hood Cam
  	fov=68
  	model=0
  	view=0
  	wheels=0
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	offset
  	{
    		x=0
    		y=-0.7
    		z=0.7
  	}
  	angle
  	{
    		x=9
    		y=180
    		z=0
  	}
}

camera5
{
  	name=Effect Cam 1
  	fov=68
  	model=0
  	view=0
  	wheels=0
  	offset
  	{
    		x=-0.67
    		y=-0.17
    		z=-3.94
  	}
  	angle
  	{
    		x=2.5
    		y=-150
    		z=-15
  	}
  	follow
  	{
    		pitch=0
    		yaw=0
    		roll=0
  	}
}

camera6
{
 	name=Effect Cam 2
 	fov=68
 	model=0
 	view=1
 	wheels=1
 	follow
 	{
  		pitch=0
  		yaw=0
  		roll=0
 	}
 	offset
 	{
  		x=0
  		y=-0.25
  		z=-5.5
 	}
 	angle
 	{
  		x=6
  		y=30
  		z=0
 	}
}

camera7
{
 	name=Effect Cam 3
 	fov=68
 	model=0
 	view=0
 	wheels=1
 	follow
 	{
  		pitch=0
  		yaw=1
  		roll=0
 	}
 	offset
 	{
  		x=0
  		y=0
  		z=-9
 	}
 	angle
 	{
  		x=4
  		y=34
  		z=-14
 	}
}

camera8
{
 	name=Effect Cam 4 - Wheel
 	fov=68
 	model=0
 	view=0
 	wheels=0
 	offset
 	{
  		x=1.15
  		y=0.2
  		z=0.35
 	}
 	angle
 	{
  		x=-2
  		y=-175
  		z=-7
 	}
 	follow
 	{
  		pitch=1
  		yaw=1
  		roll=1
 	}
}

camera9
{
 	name=Effect Cam 5
 	fov=25
 	model=0
 	view=0
 	wheels=1
 	follow
 	{
  		pitch=0
  		yaw=0
  		roll=0
 	}
 	offset
 	{
  		x=0
  		y=0.25
  		z=-9
 	}
 	angle
 	{
  		x=10
  		y=150
  	z=0
 	}
}
audio
{
	skid
	{
		sample=Skid.wav
	}
	horn
	{
		sample=Horn.wav
	}
  	shiftout
  	{
    		sample=Shift_Out.wav
  	}
	acc_all
	{
		attack=1350
		decay=1350
	}
	accelerate_out
	{
		smp0~audio.acc_all
		{
			sample=1000.wav
			min=1000
			max=1001
			natural=1100
			volume=1
		}
		smp1~audio.acc_all
		{
			sample=2000.wav
			min=2000
			max=2001
			natural=2100
			volume=1.1
		}
		smp2~audio.acc_all
		{
			sample=3000.wav
			min=3000
			max=3001
			natural=3100
			volume=1.1
		}
		smp3~audio.acc_all
		{
			sample=4000.wav
			min=4000
			max=4001
			natural=3750
			volume=1.3
		}
		smp4~audio.acc_all
		{
			sample=5000.wav
			min=5000
			max=5001
			natural=4750
			volume=1.4
		}
		smp5~audio.acc_all
		{
			sample=6000.wav
			min=6000
			max=6001
			natural=5750
			volume=1.5
		}
		smp6~audio.acc_all
		{
			sample=7000.wav
			min=7000
			max=7001
			natural=6750
			volume=1.6
		}
	}

	decelerate_out
	{
		smp0~audio.acc_all
		{
			sample=Low.wav0
			min=1250
			max=1251
			natural=750
			volume=1
		}
		smp1~audio.acc_all
		{
			sample=Mid.wav0
			min=2500
			max=2501
			natural=2000
			volume=1.33
		}
		smp2~audio.acc_all
		{
			sample=High.wav0
			min=3750
			max=3751
			natural=3250
			volume=1.5
		}
		smp3~audio.acc_all
		{
			sample=Redline.wav0
			min=5000
			max=5001
			natural=4500
			volume=2.0
		}
	}
	wind
	{
		volume=9
		pitch_scale=1
		pitch_offset=30
		smp0
		{
			sample=Wind1.wav
			min=5
			max=6
			attack=33
			decay=33
			natural=80
		}
		smp1
		{
			sample=Wind2.wav
			min=30
			max=31
			attack=33
			decay=33
			natural=80
		}
		smp2
		{
			sample=Wind3.wav
			min=55
			max=56
			attack=33
			decay=33
			natural=80
		}
	}
}

m4tig