car
{
   name=Zastava 1100P Rally
   year=1977
   credits=Converted from GTA San Andreas by Priban.
   comments=1.2L
   id=Zastava_rally
   version=0655
   wheels=4
   skid
   {
      sample=skid.wav
   }
   shadow
   {
      texture=shadow.tga
      width=2.25
      length=5.513
      offset_z=0.06
   }
   cg
   {
    x=0
    y=-0.33
    z=0.15
   }
}
particles
{
  backfire
  {
    exhaust0
    {
      pos=-0.28 0.09 -2.07
      normal=0 0 -1
    }
    exhaust1
    {
     pos=0.28 0.19 -2.17
     normal=0 0 -1
    }
    type=backfire
    min_rpm=1000
    ; suppose car comes from 9000 rpm for example. Then backfiring can happen when max_rpm is reached
    max_rpm=5500
    ; high backfire likeliness for rally cars
    likeliness_percentage=30
  }
} 
wipers
{
  ; Windscreen wipers
  count=2
  wiper0
  {
    x=0.62
    y=0.41
    z=0.62
    xa=55
    min_angle=95
    max_angle=20
    model
    {
      file=wiper.dof
    }
  }
  wiper1
  {
    x=0
    y=0.43
    z=0.76
    xa=60
    min_angle=85
    max_angle=25
    model
    {
      file=wiper.dof
    }
  }
}
body
{
   mass=830
   inertia
   {
    x=2200
    y=2400
    z=900
   }
   restitution_coeff=0.1
   x=0
   y=0
   z=0
   width=1.585
   height=1.250
   length=3.726
   manual_box=1
   model_light_l
   {
      file=
   }
   model_light_r
   {
      file=
   }
   model
   {
      file=zastava.dof
   }
   model_braking_l
   {
      file=
   }
   model_incar
   {
      file=zastava.dof
   }
}

steer
{
  x=0.342
  y=0.2
  z=0.68
  radius=0.171
  xa=18
  linearity=0.2
  lock=1360
  model
  {
    file=kiera.dof
  }
}
engine
{
  mass=60
  max_rpm=7000
  idle_rpm=900
  stall_rpm=0
  start_rpm=1000
  autoclutch_rpm=0
  starter=1
  starter_torque=65
  curve_torque=torque.crv
  max_torque=120
  start_stalled=1
  reaction=0
  shifting
  {
    automatic=0
    shift_up_rpm=5300
    shift_down_rpm=2000
    time_to_declutch=399
    time_to_clutch=300
  }
  inertia
  {
    engine=0.22
    final_drive=0.15
  }
  braking_coeff=0.90
  rolling_friction_coeff=0.55
  ;sample=rotor.wav
  ;sample_rpm=6000
}
gearbox
{
   gears=5
   gear0
   {
      inertia=0.2
      ratio=-3.87
   }
   gear1
   {
      ratio=4.2
      inertia=0.15
   }
   gear2
   {
      ratio=2.4
      inertia=0.1
   }
   gear3
   {
      ratio=1.5
      inertia=0.08
   }
   gear4
   {
      ratio=1.09
      inertia=0.06
   }
}
clutch
{
   max_torque=1000
}
handbrakes
{
   wheels=23
}
differential
{
  type=1
  ratio=4.077
  locking_coefficient=50
  output0=0
  output1=1
}
aero
{
   body
   {
      center=0 0 0
      cx=0.38
      area=1.70
   }
   wings=0
}
antirollbar
{
  count=2
  arb0
  {
    susp_left=0
    susp_right=1
    k=38500
  }
  }
  arb1
  {
    susp_left=2
    susp_right=3
    k=12000
  }
}
susp_front
{
   y=0.21
   z=1.48
  restlen=0.50
  minlen=0.30
  maxlen=0.60
	k=40000
  bump_rate=1350
  rebound_rate=2500
	anti_pitch=-0.12
  	roll_center
  	{
    		x=0
    		y=-0.632
    		z=0
  	}
}
susp_rear
{
   y=0.235
   z=-1.06
  restlen=0.50
  minlen=0.30
  maxlen=0.60
	k=40500
  bump_rate=1350
  rebound_rate=2780
	anti_pitch=-0.10
  	roll_center
  	{
    		x=0
    		y=-0.623
    		z=0
  	}
}
susp0~susp_front
{
   x=0.75
}
susp1~susp_front
{
   x=-0.75
}
susp2~susp_rear
{
   x=0.75
}
susp3~susp_rear
{
   x=-0.75
}
tire_model_front
{
   damping_predict_lat=0.492
   damping_predict_long=0.018
}
tire_model_rear
{
   damping_predict_lat=0.504
   damping_predict_long=0.020
}
pacejka
{
    	a0=1.25
    	a1=-30
    	a2=1035
    	a3=1560
    	a4=8
    	a5=0.015
    	a6=-0.25
    	a7=0.1
    	a8=-0.03
    	a9=-0.001
    	a10=-0.15
    	a111=-8.5
    	a112=-0.29
    	a12=17.8
    	a13=-2.4
    	b0=1.5
    	b1=-60
    	b2=1150
    	b3=2
    	b4=350
    	b5=0.08
    	b6=0
    	b7=0.05
    	b8=-0.025
    	b9=0.015
    	b10=0.4
    	b11=-80
    	b12=0
    	c0=2.2
    	c1=-4
    	c2=-3
    	c3=-1.0
    	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.08276
    	optimal_slipangle=0.14444
}
wheel_front
{
   y=0
   z=0
   max_braking=1500
   braking_factor=1
   steering=1
   lock=52
   ackerman=0
   mass=13
   inertia=0.7
   radius=0.274
   width=0.214		
   slices=20
   friction_road=1.7
   tire_rate=290000
   pacejka~pacejka
   {
     a0=1.55
      a1=-50
      a2=1750
      a3=2300
      b0=1.625
      b1=-100
      b2=1750
      b4=400
      c1=-4.0
      c3=-1.31
      c4=-8.0
      optimal_slipratio=0.08
      optimal_slipangle=0.17
   }
}
wheel_rear
{
   y=0
   z=0
   max_braking=900
   braking_factor=1
   steering=0
   mass=13
   inertia=0.78
   radius=0.274
   width=0.214		
   slices=20
   friction_road=1.7
   max_handbrake_torque=3000
   tire_rate=290000
   pacejka~pacejka
   {
      a0=1.55
      a1=-50
      a2=1750
      a3=2300
      b0=1.625
      b1=-100
      b2=1750
      b4=400
      c1=-4.0
      c3=-1.31
      c4=-8.0
      optimal_slipratio=0.08
      optimal_slipangle=0.17
   }
}
wheel0~wheel_front
{
  x=0
  camber=-.5
  toe=-.15
  model
  {
    file=left.dof
  }
  ;model_brake
  ;{
    ;file=bl.dof
  ;}
}
wheel1~wheel_front
{
  x=0
  camber=-.5
  toe=.15
  model
  {
    file=right.dof
  }
  ;model_brake
  ;{
    ;file=br.dof
  ;}
}
wheel2~wheel_rear
{
  x=0
  camber=-0.5
  toe=-0.004
  model
  {
    file=left.dof
  }
  ;model_brake
  ;{
    ;file=bl.dof
  ;}
}
wheel3~wheel_rear
{
  x=0
  camber=-0.5
  toe=0.004
  model
  {
    file=right.dof
  }
  ;model_brake
  ;{
    ;file=br.dof
  ;}
}
camera0
{
  	name=Widok kierowcy
  	model=0
  	wheels=0
  	view=0
  	fov=72
  	offset
  	{
    		x=0.35
    		y=0.65
    		z=-0.
  	}
	offset_to
	{
		x=0.00
		y=0.00
		z=10.00
	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=7.00
    		y=-180.00
    		z=0.00
  	}
	src
	{
		mass=5
		k=750
		damping=150
		maxdist=0.05
	}
}

camera1
{
  	name=Spojrzenie w lewo
  	model=0
  	wheels=0
  	view=0
  	fov=72
  	offset
  	{
    		x=0.35
    		y=0.65
    		z=-0.
  	}
	offset_to
	{
		x=7.50
		y=0.00
		z=10.00
	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=7.00
    		y=-180.00
    		z=0.00
  	}
	src
	{
		mass=5
		k=750
		damping=150
		maxdist=0.05
	}
}

camera2
{
  	name=Spojrzenie w prawo
  	model=0
  	wheels=0
  	view=0
  	fov=72
  	offset
  	{
    		x=0.35
    		y=0.65
    		z=-0.
  	}
	offset_to
	{
		x=-10.00
		y=0.00
		z=10.00
	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=7.00
    		y=-180.00
    		z=0.00
  	}
	src
	{
		mass=5
		k=750
		damping=150
		maxdist=0.05
	}
}

camera3
{
  	name=Spojrzenie do tylu
  	model=0
  	wheels=0
  	view=0
  	fov=-72
  	offset
  	{
    		x=0.15
    		y=0.65
    		z=-0.
  	}
	offset_to
	{
		x=-1
		y=0.35
		z=-10
	}
	src
	{
		mass=1
		k=300
		damping=25
		maxdist=0.03
	}
	dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}

camera4
{
  	name=Kamera od tylu
  	model=0
  	wheels=0
  	view=0
  	fov=60.00
  	offset
  	{
    		x=0.00
    		y=1.60
    		z=-4.90
  	}
  	src
  	{
    		mass=6
    		k=600
    		damping=120
   		maxdist=2
  	}
  	angle
  	{
    		x=0.00
    		y=0.00
    		z=0.00
  	}
  	follow
  	{
    		pitch=0
    		yaw=0
   		roll=0
  	}
}

camera5
{
  	name=Kamera od przodu
  	fov=65
  	offset
  	{
    		x=0.00
   		y=0.30
    		z=-4.50
  	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=0
  	}
  	angle
  	{
    		x=15.00
    		y=-360.00
    		z=0.00
  	}
}

camera6
{
  	name=Kamera z kola
  	model=0
  	wheels=0
  	view=0
  	fov=72
  	offset
  	{
    		x=1.15
    		y=0.20
    		z=0.35
  	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=-2.00
    		y=-175.50
    		z=-7.00
  	}
}

camera7
{
  	name=Kamera z dystansu
  	model=0
  	wheels=1
  	view=0
  	fov=20
  	offset
  	{
    		x=0.00
    		y=0.25
    		z=-9.00
  	}
  	follow
  	{
    		pitch=0
    		yaw=0
    		roll=0
  	}
  	angle
  	{
    		x=10.00
    		y=150.00
    		z=0.00
  	}
}

camera8
{
  	name=Kamera z maski
  	model=0
  	wheels=1
  	view=0
  	fov=65
  	offset
  	{
    		x=0
    		y=0.4
    		z=2
  	}
	offset_to
	{
		x=0.00
		y=0.00
		z=10.00
	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=7.00
    		y=-180.00
    		z=0.00
  	}
	src
	{
		mass=5
		k=750
		damping=150
		maxdist=0.05
	}
}

camera9
{
  	name=Kamera ze zderzaka
  	model=0
  	wheels=1
  	view=0
  	fov=60
  	offset
  	{
    		x=0
    		y=-0.25
    		z=1.99
  	}
	offset_to
	{
		x=0.00
		y=0.00
		z=10.00
	}
  	follow
  	{
    		pitch=1
    		yaw=1
    		roll=1
  	}
  	angle
  	{
    		x=7.00
    		y=-180.00
    		z=0.00
  	}
	src
	{
		mass=5
		k=750
		damping=150
		maxdist=0.05
	}
}

audio
{
  skid
  {
    sample=Skid.wav
    sample2=Skid.wav
  }
  acc_all
  {
    attack=1000
    decay=1000
  }
  shiftout
  {
    sample=Shiftout.wav	
  }
  shiftin
  {
    sample=Shiftin.wav
  }
  accelerate_out
  {
    volume=1
    smp0
    {
      sample=Idle.wav
      min=0
      max=1500
      attack=0
      decay=1000
      natural=900
    }
    smp1
    {
      volume=0.8
      sample=Turbo.wav
      min=3250
      max=12000
      attack=1000
      decay=0
      natural=1500
    }
    smp2
    {
      sample=6900.wav
      min=0
      max=9999
      attack=0
      decay=0
      natural=5000
    }
  }
  decelerate_out
  {
    volume=0.8
    smp0
    {
      sample=Idle.wav
      min=0
      max=1500
      attack=0
      decay=1000
      natural=900
    }
    smp1
    {
      volume=0.75
      sample=Wastegate.wav
      min=5000
      max=8500
      attack=1000
      decay=0
      natural=12000
    }
    smp2
    {
      sample=6900.wav
      min=0
      max=9999
      attack=0
      decay=0
      natural=5000
    }
  }
  gearwhine
  {
    volume=0.8
    pitch_scale=0.001
    pitch_offset=0
    smp0
    {
      sample=Gearwhine.wav
      min=0
      max=10000
      natural=4000
    }
  }
}
  wind
  {
    volume=10
    pitch_scale=0
    pitch_offset=50
    smp0
    {
      sample=Wind1.wav
      min=25
      max=26
      attack=33
      decay=33
      natural=80
    }
    smp1
    {
      sample=Wind2.wav
      min=50
      max=51
      attack=33
      decay=33
      natural=80
    }
    smp2
    {
      sample=Wind3.wav
      min=75
      max=76
      attack=33
      decay=33
      natural=80
  }
 }
}