<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <nasal>
    <load>
      <![CDATA[

      var nodeName = cmdarg().getPath();

      print("Loading Dornier Do 335 ", nodeName);

      if ( bombable.check_overall_initialized (nodeName) ) {
        return;
      }

      var object_init = func() {
        thisNodeName = cmdarg().getPath();

        var bombableObject = {

          objectNodeName : thisNodeName,
          objectNode     : props.globals.getNode(thisNodeName),
          updateTime_s   : 1/3,
          altitudes : {
            wheelsOnGroundAGL_m : 1,
            minimumAGL_m        : 100,
            maximumAGL_m        : 13715,
            crashedAGL_m        : 0.6,
          },
          velocities : {
            maxSpeedReduce_percent                       : 0.5,
            minSpeed_kt                                  : 90,
            cruiseSpeed_kt                               : 370,
            attackSpeed_kt                               : 390,
            maxSpeed_kt                                  : 412,
            damagedAltitudeChangeMaxRate_meterspersecond : 30,

            diveTerminalVelocities: {
              point1: { airspeed_kt : 377, vertical_speed_fps : -41.8},
              point2: { airspeed_kt : 416, vertical_speed_fps : -87.2},
              point3: { airspeed_kt : 430, vertical_speed_fps : -188.8},
              point4: { airspeed_kt : 547, vertical_speed_fps : -302},
            },
            climbTerminalVelocities: {
              point1: { airspeed_kt : 344, vertical_speed_fps : 27.6},
              point2: { airspeed_kt : 314, vertical_speed_fps : 52.6},
              point3: { airspeed_kt : 297, vertical_speed_fps : 88},
              point4: { airspeed_kt : 252, vertical_speed_fps : 88},
            },
          },
          evasions : {
            dodgeDelayMax_sec             : 15,
            dodgeDelayMin_sec             : 5,
            dodgeMax_deg                  : 79,
            dodgeMin_deg                  : 58,
            rollRateMax_degpersec         : 65,
            dodgeROverLPreference_percent : 50,
            dodgeAltMax_m                 : 5000,
            dodgeAltMin_m                 : -5000,
            dodgeVertSpeedClimb_mps       : 80,
            dodgeVertSpeedDive_mps        : 160,
          },
          attacks : {
            maxDistance_m              : 20000,
            minDistance_m              : 1600,
            continueAttackAngle_deg    : 80,
            altitudeHigherCutoff_m     : 15000,
            altitudeLowerCutoff_m      : 10000,
            rollMin_deg                : 58,
            rollMax_deg                : 79,
            rollRateMax_degpersec      : 65,
            climbPower                 : 4500,
            divePower                  : 9000,
            attackCheckTime_sec        : 6,
            attackCheckTimeEngaged_sec : 0.6,
          },
          weapons : {
            cannon_left : {
              name                : "20 mm Mauser MG 151 gun",
              maxDamage_percent   : 18,
              maxDamageDistance_m : 1500,
              weaponAngle_deg     : { heading: 0, elevation: 0 },
              weaponOffset_m      : { x:-2.125, y:-1.981, z:-0.336 },
              weaponSize_m        : { start: 0.1, end: 0.1 },
            },
            cannon_center : {
              name                : "30 mm Rheinmetall MK 103 cannon",
              maxDamage_percent   : 18,
              maxDamageDistance_m : 1500,
              weaponAngle_deg     : { heading: 0, elevation: 0 },
              weaponOffset_m      : { x:-6.913, y: 0.000, z: 0.083 },
              weaponSize_m        : { start: 0.1, end: 0.1 },
            },
            cannon_right : {
              name                : "20 mm Mauser MG 151 gun",
              maxDamage_percent   : 18,
              maxDamageDistance_m : 1500,
              weaponAngle_deg     : { heading: 0, elevation: 0 },
              weaponOffset_m      : { x:-2.125, y: 1.981, z:-0.336 },
              weaponSize_m        : { start: 0.1, end: 0.1 },
            },
          },
          dimensions : {
            width_m             : 13.80,
            length_m            : 13.85,
            height_m            : 5.00,
            damageRadius_m      : 6.925,
            vitalDamageRadius_m : 2,
            crashRadius_m       : 6,
          },
          vulnerabilities : {
            damageVulnerability               : 45,
            engineDamageVulnerability_percent : 4,
            fireVulnerability_percent         : 5,
            fireDamageRate_percentpersecond   : 0.2,
            fireExtinguishMaxTime_seconds     : 50,
            fireExtinguishSuccess_percentage  : 50,
            explosiveMass_kg                  : 40772,
          },
          damageLiveries : {
            damageLivery : [  ]
          },
        };
        bombable.initialize ( bombableObject );
        # bombable.location_init ( thisNodeName );
        bombable.ground_init ( thisNodeName );
        bombable.bombable_init ( thisNodeName );
        bombable.attack_init ( thisNodeName );
        bombable.weapons_init ( thisNodeName );
        bombable.startSmoke("pistonexhaust", thisNodeName );
      }
      object_init();
      ]]>
    </load>
    <unload>
      <![CDATA[
      print("Unload Dornier Do 335.");
      var nodeName = cmdarg().getPath();
      bombable.de_overall_initialize( nodeName );
      bombable.initialize_del( nodeName );
      bombable.ground_del( nodeName );
      bombable.location_del (nodeName);
      bombable.bombable_del( nodeName );
      bombable.attack_del( nodeName );
      bombable.weapons_del (nodeName);
      ]]>
    </unload>
  </nasal>

</PropertyList>
