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

<PropertyList>

  <nasal>
    <load>
      <![CDATA[

      var nodeName = cmdarg().getPath();

      print("Loading Henschel Hs P 75 ", 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                                  : 85,
            cruiseSpeed_kt                               : 300,
            attackSpeed_kt                               : 340,
            maxSpeed_kt                                  : 427,
            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 : {
            gun_left : {
              name                : "20 mm canons Hispano-Suiza Mk.II",
              maxDamage_percent   : 18,
              maxDamageDistance_m : 1500,
              weaponAngle_deg     : { heading: 0, elevation: 0 },
              weaponOffset_m      : { x:3, y:-3, z:0 },
              weaponSize_m        : { start:0.1, end:0.1 },
            },
            gun_right : {
              name                : "20 mm canons Hispano-Suiza Mk.II",
              maxDamage_percent   : 18,
              maxDamageDistance_m : 1500,
              weaponAngle_deg     : { heading: 0, elevation: 0 },
              weaponOffset_m      : { x:3, y:3, z:0 },
              weaponSize_m        : { start:0.1, end:0.1 },
            },
          },
          dimensions : {
            width_m             : 11.3,
            length_m            : 12.2,
            height_m            : 4.3,
            damageRadius_m      : 6.1,
            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 Henschel Hs P 75.");
        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>
