<Template name=spaceshipShuttle>
  <SpaceShip
   hudtemplate            = spaceshiphud
   camerapositiontemplate = spaceshipTransportercameras
   spawnparticlesource    = "Orxonox/fairytwirl"
   spawnparticleduration  = 3
   explosionchunks        = 6

   health            = 2000
   maxhealth         = 2500
   initialhealth     = 2000

   primaryThrust     = 120;
   auxilaryThrust    = 20;
   rotationThrust    = 30;

   collisionType     = "dynamic"
   mass              = 1000
   linearDamping     = 0.7
   angularDamping    = 0.9999999
  >
    <engines>
      <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine />
    </engines>
    <attached>
      <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale=10 mesh="Transporterspaceship.mesh" />
    </attached>
    <collisionShapes>
      <BoxCollisionShape position=" 0, 0, 20"      halfExtents=" 37, 25, 80" />
      <BoxCollisionShape position=" 0, 21, 20"      halfExtents=" 37, 21, 80" />
      <BoxCollisionShape position=" 0, 40, 110"      halfExtents=" 20, 10, 40" />
      <BoxCollisionShape position=" 0, 45, 170"      halfExtents=" 33, 25, 20" />
      <BoxCollisionShape position=" -60, 33, 0"      halfExtents=" 24, 16, 120" />
      <BoxCollisionShape position=" 60, 33, 0"      halfExtents=" 24, 16, 120" />
      <BoxCollisionShape position=" 0, 10, -90"      halfExtents=" 30, 25, 30" />
      <BoxCollisionShape position=" 0, -3, -145"      halfExtents=" 20, 20, 30" />
    </collisionShapes>

<?lua
  include("../includes/weaponSettingsTransporter.oxi")
?>
  </SpaceShip>
</Template>

<Template name=spaceshipTransportercameras defaults=0>
  <SpaceShip>
    <camerapositions>
      <CameraPosition position="0,90,350" drag=true mouselook=true />
      <CameraPosition position="0,125, 400" drag=true mouselook=true />
      <CameraPosition position="0,200,550" drag=true mouselook=true />
    </camerapositions>
  </SpaceShip>
</Template>

<Template name=spaceshipTransporterengine baseclass=MultiStateEngine>
  <MultiStateEngine
   boostfactor    = 2

   speedfront     = 120
   speedback      =  20
   speedleftright =  20
   speedupdown    =  20

   defEngineSndNormal = "sounds/Engine_low.ogg"
   defEngineSndBoost = "sounds/Engine_high.ogg"

   accelerationfront     = 40
   accelerationbrake     = 30
   accelerationback      = 20
   accelerationleftright =  20
   accelerationupdown    =  20
  >
    <EffectContainer condition="idle">
      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
    </EffectContainer>
    <EffectContainer condition="not idle">

    </EffectContainer>
    <EffectContainer condition="normal or brake">

    </EffectContainer>
    <EffectContainer condition="normal or boost">
      <Backlight mainstate=activity active=false scale=2 name=bltest position=" -80, 33, 100" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
      <Backlight mainstate=activity active=false scale=2 name=bltest position=" 80, 33, 100" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
      <Backlight mainstate=activity active=false scale=2 name=bltest position=" -75, 25, -57" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
      <Backlight mainstate=activity active=false scale=2 name=bltest position=" 75, 25, -57" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    </EffectContainer>
    <EffectContainer condition="boost">
      <Backlight mainstate=activity active=false scale=3 name=bltest position=" -80, 33, 100" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
      <Backlight mainstate=activity active=false scale=3 name=bltest position=" 80, 33, 100" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
      <Backlight mainstate=activity active=false scale=3 name=bltest position=" -75, 25, -57" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
      <Backlight mainstate=activity active=false scale=3 name=bltest position=" 75, 25, -57" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    </EffectContainer>
    <EffectContainer condition="brake">
      <FadingBillboard mainstate=activity active=false scale=2 position=" -75, 33, 40" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=2 position=" 75, 33, 40" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=1 position=" -68, 25, -115" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=1 position=" 68, 25, -115" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
    </EffectContainer>
  </MultiStateEngine>
</Template>