car
{
  name=Honda Civic EG9
  year=1991
  credits=Motor: 1.6cc 160cv
  comments=Categoria: Nivel 2
  id=eg9
  version=090
  wheels=4
  shadow
  {
    texture=shadow.tga
    width=2.2
    length=4.7
    offset_z=0.1
    offset=0
  }
	cg
	{
		x=0
		y=-0.15
		z=0.25
	}
ff_factor=1.00
  ff_gain=0.65
  ff_damping=0
  ff_friction=1
  ff_inertia=0
  ff_stickfriction=1
}

particles
{ 
backfire
{
exhaust0
{
pos=0.42 -0.34 -1.81
normal=0 0 -1
} 
exhaust1
{
pos=0.34 -0.34 -1.81
normal=0 0 -1
}
type=backfire
; type=backfire_long
min_rpm=8000
; min_rpm=0
; suppose car comes from 9000 rpm for example. Then backfiring can happen when max_rpm is reached
max_rpm=8300
; max_rpm=12000
; high backfire likeliness for rally cars
likeliness_percentage=130
; likeliness_percentage=100
}
}

graphics
{
  	shadow
  	{
    		model
    		{
      			file=body.dof
			use_shaders=0
    		}
		intensity=0.2
  	}
	generic
	{
		model0
		{
		file=capot.dof
		}
		model1
		{
		file=porta_condutor.dof
		}
		model2
		{
		file=porta_passageiro.dof
		}
		model3
		{
		file=porta_tras_direita.dof
		}
    		model4
    		{
      		file=porta_tras_esquerda.dof
    		}
    		model5
    		{
      		file=mala.dof
    		}
    		model6
    		{
      		file=choques_frente.dof
    		}
    		model7
    		{
      		file=choques_tras.dof
    		}
    		model8
    		{
      		file=bancos.dof
    		}
    		model9
    		{
      		file=tablier.dof
    		}
    		model10
    		{
      		file=
    		}
    		model11
    		{
      		file=
    		}
	}
}

body
{
	x=0
	y=0
	z=0
	mass=1200 ;kg 
	inertia
	{
            x=1900
            y=2100
            z=460
	}
	width=1.695
	height=0.80
	length=4.450
	manual_box=1
	model
	{
		file=body.dof
	}
	model_incar
	{
		file=body.dof
	}
	model_light_l
	{
		file=luzes.dof
	}
	model_braking_l
	{
		file=luztravao.dof
	}
 model_lightroad_l
 {
  file=lightsin.dof
 }
  model_reverse_r
  {
    file=re.dof
}
}
flares
{
  ; front lights
  flare0
  {
    color=100 50 60
    hor_scale=1
    intensity=1
    normal=0.000 0.000 1.000
    pos=-0.50 -0.06 1.71
    rule=
    size_factor=1.5
    z_offset=-5000
  }
  flare1
  {
    color=100 50 60
    hor_scale=1
    intensity=1
    normal=0.000 0.000 1.000
    pos=0.50 -0.06 1.71
    rule=
    size_factor=1.5
    z_offset=-5000
  }
  ; brake lights
  flare2
  {
    color=1 0.2 0.2
    hor_scale=1
    intensity=1.5
    normal=0.000 0.000 -1.000
    pos=-0.73 0.03 -1.97
    rule=brake
    size_factor=0.9
    z_offset=-1000
  }
  flare3
  {
    color=1 0.2 0.2
    hor_scale=1
    intensity=1.5
    normal=0.000 0.000 -1.000
    pos=0.73 0.03 -1.97
    rule=brake
    size_factor=0.9
    z_offset=-1000
  }
  ;flare3
  {
    color=1 0.2 0.2
    hor_scale=1
    intensity=1.5
    normal=0.000 0.000 -1.000
    pos=0 0.3 -1.92
    rule=brake
    size_factor=0.3
    z_offset=-1000
    }
}

;lights
{
  light0
  {
    aspect=1
    color=10.00 10.00 12.00
    far=150
    fov=20
    texture=light.tga
    pitch=0
    z=-1.0
  }
}

wipers
{
  ; Windscreen wipers
  count=3
  wiper0
  {
    x=-0.28
    y=0.35
    z=-1.64
    xa=-75
    min_angle=5
    max_angle=5  ;-85
    model
    {
      file=wiper.dof
    }
  }
  wiper1
  {
    x=0.56
    y=0.18 
    z=0.81
    xa=67
    min_angle=4
    max_angle=4  ;-82
    model
    {
      file=wiper1.dof
    }
  }
  wiper2
  {
    x=0.08
    y=0.18 
    z=0.9
    xa=57
    min_angle=-11
    max_angle=-11  ;-107
    model
    {
      file=wiper2.dof
    }
  }
}

steer
{
	x=0.29
	y=0.1
	z=0.12
	xa=15.9		
	lock=1080		
	linearity=0.25
	model
	{
		file=volante.dof
	}
}

engine
{
	x=0
	y=0.5
	z=0.5
	size=0.25
	mass=100

	idle_rpm=750
	max_rpm=9000
	stall_rpm=500
	start_rpm=1500
	start_stalled=1
	starter_torque=100
	autoclutch_rpm=1500

	curve_torque=b16a2.crv
	max_torque=160
	shifting
	{
		automatic=0
      shift_up_rpm=8000
      shift_down_rpm=4500
      time_to_declutch=100
		time_to_clutch=80
		time_in_neutral=100
		time_to_declutch_down=135
		time_to_clutch_down=135
		time_in_neutral_down=135
	}
	inertia
	{
		engine=0.1595
		final_drive=0.1
	}
	braking_coeff=2.5
	rolling_friction_coeff=0.1
	sample=engine.wav
	sample_rpm=5900
}

;----------------------drivetrain----------------------


gearbox
{
	gears=6

	gear0
	{
		ratio=-3
		inertia=0.02
	}

	gear1
	{
		ratio=3.23
		inertia=-0.04
      engine_map=13.51
	}

	gear2
	{
		ratio=2.105
		inertia=-0.05
      engine_map=8.75
	}

	gear3
	{
		ratio=1.458
		inertia=0.06
      engine_map=6.04
	}

	gear4
	{
		ratio=1.107
		inertia=0.07
      engine_map=4.71
	}

	gear5
	{
		ratio=0.848
		inertia=0.06
      engine_map=3.71
	}
}

differential
{
	type=1
	ratio=4.4
	inertia=0.15
	locking_coeff=60
      clutches=1
	output0=0
	output1=1
}

clutch
{
	max_torque=152
}
handbrakes
{
	wheels=23
}
aero
{
	body
	{
		center=0 0 0
		cx=0.31 ;real ctr data
		area=1.848
	}
	wings=1
	wing0
	{
		name=Rear spoiler
		span=1
		cord=1
		coeff_drag=0
		coeff_down=2
		center=0 0 -1
		angle=0
		angle_offset=10
	}
}


antirollbar
{
	count=2
	arb0
	{
		susp_left=0
		susp_right=1
		k=1475
	}
	arb1
	{
		susp_left=2
		susp_right=3
		k=1465
	}
}

susp_front
{
	y=0.01
	z=1.12
	restlen=0.410			;293	395kg
	minlen=0.22
	maxlen=0.46
	k=43781.6943144			;@ static load and 1.316 NF SR
	bump_rate=4600		;0.7	1944
	rebound_rate=4600	;0.7	6531
	bump_function=0
	rebound_function=0
	anti_pitch=0.1
	camber_change_per_m=0.067
	roll_center
	{
		x=0
		y=-0.552	;60mm
		z=0
	}
}

susp_rear
{
	y=0.01
	z=-1.39
	restlen=0.410			;305	275kg
	minlen=0.2
	maxlen=0.43
	k=43781.6943144			;@ static load and 1.502 NF SR
	bump_rate=4600		;0.75	1852
	rebound_rate=4200	;0.8	5191
	bump_function=0
	rebound_function=0
	anti_pitch=0.1
	camber_change_per_m=0.14
	roll_center
	{
		x=0
		y=-0.504	;120mm
		z=0
	}
}

susp0~susp_front
{
	x=0.70
	camber_change_steering=0.147	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
	caster_offset=-0.0235		;8 degrees static caster -0.0235	
	toe_change_per_m=0
}
susp1~susp_front
{
	x=-0.70
	camber_change_steering=-0.147	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
	caster_offset=-0.0235		;5.78 degrees static caster -0.0235
	toe_change_per_m=0
}

susp2~susp_rear
{
	x=0.72
}
susp3~susp_rear
{
	x=-0.72
}

;----------------------tyres----------------------

tire_model
{
  relaxation_length_lat=0.91
  relaxation_length_long=.091
  damping_speed=8.45
  damping_coefficient_lat=1
  damping_coefficient_long=1
}
pacejka
{
  ; Pacejka constants for all tires
; Lateral force
  a0=1.
  a1=-45 
  a2=1600 
  a3=2100
  a4=1 
  a5=0.1
  a6=-0.6589
  a7=0.0565
  a8=0
  a9=0
  a10=0
  a111=0
  a112=0
  a12=0
  a13=0

  b0=1.28
  b1=-98 
  b2=1200 ;1200 
  b3=30
  b4=166
  b5=-0.2
  b6=0
  b7=0
  b8=0.252
  b9=0
  b10=0

  c0=2.46
  c1=-2.77
  c2=-2.9
  c3=-0
  c4=-3.6
  c5=0.1460 ;-0.1
  c6=0.0004
  c7=0.22
  c8=-2.31
  c9=3.87
  c10=0.0007
  c11=-0.05
  c12=-0.006
  c13=0.33
  c14=-0.04 
  c15=-0.4
  c16=0.092
  c17=0.0114

 optimal_slipratio=0.11
 optimal_slipangle=0.145
}

wheel_all
{
  ; Brakedisc temperature
  brake_heating=0.003
  brake_dissipation=0.0005
  brake_max_temp=1000
}

;----------------------wheels----------------------

wheel_front
{
	y=0
	z=0
	steering=1
	powered=1
	lock=52
	mass=15.8
	inertia=0.3990519
	radius=0.3
	rolling_coeff=0.015
	max_braking=1100
	braking_factor=1
	tire_rate=160000
	pacejka~pacejka
	}
}

wheel_rear
{
	y=0
	z=0
	steering=0
	powered=0
	mass=15.8
	inertia=0.3990519
	radius=0.3
	rolling_coeff=0.0150
	max_braking=500
	braking_factor=0.25
	max_handbrake_torque=3500
	tire_rate=160000
	pacejka~pacejka
	}
}

wheel0~wheel_front
{
  x=0
  ackerman=1.1
  toe=-0.36
  camber=-1
  model
  {
    file=lwheel.dof
  }
  model_brake
  {
    file=caliper_left1.dof
  }
}
wheel1~wheel_front
{
  x=0
  ackerman=1.1
  toe=0.36
  camber=-1
  model
  {
    file=rwheel.dof
  }
  model_brake
  {
    file=caliper_right1.dof
  }
}
wheel2~wheel_rear
{
  x=0
  toe=-0.37
  camber=-1.5
  model
  {
    file=lwheel.dof
    offset
    {
    x=-0.014
    }
  }
  model_brake
  {
    file=caliper_left1.dof
  }
}
wheel3~wheel_rear
{
  x=0
  toe=0.37
  camber=-1.5
  model
  {
    file=rwheel.dof
    offset
    {
    x=0.014
    }
  }
  model_brake
  {
    file=caliper_right1.dof
  }
}

;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------

audio
{
  skid
  {
    ; New style (multiple samples mixed)
    ; Master volume for this set
    volume=1
    ; Acceleration
	; Outside of the car
    smp0
    {
      volume=0.4
      sample=audio/skid_01.wav
      min=0.3
      max=0.3
      attack=0.2
      decay=0.4
    }
    smp1
    {
      volume=0.6
      sample=audio/skid_02.wav
      min=0.6
      max=20
      attack=0.4
      decay=0
    }
  }
acc_all
  {
    attack=750
    decay=750
	;pitch_scale=3
	; pitch = pitch_scale * pitch_input + pitch_offset
	;pitch_offset=50
  }
  accelerate_out
  {
    smp0~audio.acc_all
    {
      sample=audio/in_1698.wav
      min=0
      max=1698
      natural=1698
      volume=0.15
    }
    smp1~audio.acc_all
    {
      sample=audio/in_power4461.wav
      min=1698
      max=4461
      natural=4461
	  ;attack=2000
	  ;decay=2000
      volume=0.16
    }
    smp2~audio.acc_all
    {
      sample=audio/in_power7065.wav
      min=4461
      max=7065
      natural=7065
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp3~audio.acc_all
    {
      sample=audio/in_power7620.wav
      min=7065
      max=9000
      natural=7620
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp4~audio.acc_all
    {
      sample=audio/in_coast4602.wav
      min=4602
      max=7692
      natural=4602
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp5~audio.acc_all
    {
      sample=audio/ex_coast7692.wav
      min=7692
      max=9000
      natural=7692
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
  }
  decelerate_out
  {
    smp0~audio.acc_all
    {
      sample=audio/in_1698.wav
      min=0
      max=1698
      natural=1698
      volume=0.15
    }
    smp1~audio.acc_all
    {
      sample=audio/in_power4461.wav
      min=1698
      max=4461
      natural=4461
	  ;attack=2000
	  ;decay=2000
      volume=0.16
    }
    smp2~audio.acc_all
    {
      sample=audio/in_power7065.wav
      min=4461
      max=7065
      natural=7065
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp3~audio.acc_all
    {
      sample=audio/in_power7620.wav
      min=7065
      max=9000
      natural=7620
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp4~audio.acc_all
    {
      sample=audio/in_coast4602.wav
      min=4602
      max=7692
      natural=4602
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
    smp5~audio.acc_all
    {
      sample=audio/ex_coast7692.wav
      min=7692
      max=9000
      natural=7692
	  ;attack=2000
	  ;decay=2000
      volume=.97
    }
  }
  wind
  {
    volume=15
    pitch_scale=1
    pitch_offset=50
    smp0
    {
      sample=audio/wind1.wav
      min=25
      max=26
      attack=33
      decay=33
      natural=80
    }
    smp1
    {
      sample=audio/wind2.wav
      min=50
      max=51
      attack=33
      decay=33
      natural=80
    }
    smp2
    {
      sample=audio/wind3.wav
      min=75
      max=76
      attack=33
      decay=33
      natural=80
    }
  }
  horn
  {
	sample=audio/horn.wav
  }
}

;----------------------driving aids----------------------

traction_control
{
	max_velocity_ratio=1.1
	min_velocity_ratio=1.05
	enable=0
}

abs
{
	max_velocity_ratio=1.1
	min_velocity_ratio=1.1
	enable=0
}


;---------------------------------------------
;Cameras
;---------------------------------------------

camera0
{
	fov=50
  model=0
  name=chase
  wheels=1
  angle
  {
    x=0
    y=180
    z=0
  }
  follow
  {
    pitch=1
    roll=1
    yaw=1
  }
  offset
  {
    x=0
    y=1.0
    z=-6.8
  }
  offset_to
  {
    x=0
    y=0
    z=10
  }
  src
  {
    mass=5
    k=320
    damping=80
    maxdist=2.5
  }
  dst
  {
    mass=1
    k=400
    damping=40
    maxdist=1.5
  }
}
camera1
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0.0
    y=-0.28751
    z=-12
  }
  angle
  {
    x=4.861111
    y=77.843800
    z=-11.322908
  }
  fov=25
  model=0
  wheels=1
  view=0
  name=Jim Seamus Cam
}
camera2

{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=-0.1
    y=-0.5
    z=-6
  }
  angle
  {
    x=1.5
    y=18
    z=0
  }
  name=LowFrontAngle
  fov=50
}
camera3
{
  
	fov=60
	model=0
	wheels=2
	view=0
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0.0
		y=-0.7
		z=-5
	}
	angle
	{
		x=4
		y=0
		z=0
}
camera4
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=-0.38
    y=-0.28751
    z=-4.9994
  }
  angle
  {
    x=4.861111
    y=33.853992
    z=-14.322908
  }
  fov=55
  model=0
  wheels=1
  view=0
}
}
camera5
{
	name=roda
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1.2
		y=0
		z=0.5
	}
	angle
	{
		x=0
		y=170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
  }
  fov=60
}
camera6
{
	name=ChaseClose
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=1.5
		z=-5
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
	src
	{
		mass=6
		k=600
		damping=120
		maxdist=2
	}
	angle
	{
		x=5
		y=180
		z=0
  }
}
camera7
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0.810937
    y=-0.208334
    z=-4.760015
  }
  angle
  {
    x=8.055448
    y=-405.903503
    z=0.086801
  }
  name=Front corner
}
camera8
{
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=1.6
    y=-0.5
    z=-10
  }
  angle
  {
    x=0
    y=-45
    z=0
  }
  fov=35
}
camera9
{
  name=Driver
  fov=70
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.29
    y=0.4
    z=-0.45
  }
  offset_to
  {
    x=0.43
    y=-0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
	}
}
