// This class is the container class for filling out weapon and item info
class yarm_ExtWeapDataNew extends ym_WeapDataSet config(yarmConfig);

/* Ok so we want to find thwo things: Can we go through the wall? If Yes how much
was damage reduced by?
-Each weapon data set has a "class" of penetration
-Each Wall/Object will have some sort of material type and will be XX thick for the
given angle we're firing at
*/
static function bool getWallStats(int dataindex, int MaterialType, int thickness, bool bBoost, out int damage, out float maxthick){
     local int WClass;

     WClass = default.WeaponsData[dataindex].WMClass;
     if(bBoost) WClass = Clamp(WClass+1, 1,4);// can't be better than 4!
     switch(WClass){
          case 1:
             maxthick = default.WallMatData[MaterialType].Thin;
             break;
          case 2:
             maxthick = default.WallMatData[MaterialType].Med;
             break;
          case 3:
             maxthick = default.WallMatData[MaterialType].Thick;
             break;
          case 4:
             maxthick = default.WallMatData[MaterialType].ExtraThick;
             break;
          Default:
             maxthick = 0;
     }
     if(thickness > maxthick){
        damage=0;
        return false;
     }
     damage = default.WeaponsData[dataindex].DamMin * 0.75;
     return true;
}

static function bool getDamageStats(int dataIndex, out int DamageMin, out int damageMax){
     damageMin = default.WeaponsData[dataindex].DamMin;
     damageMax = default.WeaponsData[dataindex].DamMax;
     return true;
}

defaultproperties
{
    bHidden=true
//    struct ymWeapPerfData{
//    var name Weap; // name of weapon for ease of browsing
//    var float DRMin; // the range less than which the maximum damage is used
//    var float DRMax; // the range beyondwhich the  minimum damage is used
//    var float DamMin; // min damage
//    var float DamMax; // max damage
//    var float HBMHead; // Damgage multiplier for head shots
//    var float HBMChest;  // Damgage multiplier for CHest shots
//    var float HBMLeg;   // Damgage multiplier for leg shots
//    var int   WMClass;  // what class of wall pentration
//    }

    WeaponsData(0)=(Weap=Gun,DRMin=1500,DRMax=2500,DamMin=20,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=1)

    WeaponsData(1)=(Weap=M60,DRMin=1900,DRMax=3500,DamMin=25,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=3)
    WeaponsData(2)=(Weap=SAW,DRMin=1900,DRMax=3500,DamMin=25,DamMax=35,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)

    WeaponsData(3)=(Weap=M40,DRMin=1900,DRMax=3500,DamMin=70,DamMax=80,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=3)
    WeaponsData(4)=(Weap=PGM,DRMin=1900,DRMax=3500,DamMin=70,DamMax=85,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=3)
    WeaponsData(5)=(Weap=ROBAR,DRMin=1900,DRMax=3500,DamMin=70,DamMax=95,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=4)

    WeaponsData(6)=(Weap=M16,DRMin=1900,DRMax=3500,DamMin=25,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(7)=(Weap=M14,DRMin=1900,DRMax=3500,DamMin=35,DamMax=45,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(8)=(Weap=ARB,DRMin=1900,DRMax=3500,DamMin=20,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(9)=(Weap=G36,DRMin=1900,DRMax=3500,DamMin=30,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(10)=(Weap=SA80,DRMin=1900,DRMax=3500,DamMin=15,DamMax=38,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(11)=(Weap=MA5B,DRMin=1900,DRMax=3500,DamMin=15,DamMax=40,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)

    WeaponsData(12)=(Weap=AKS,DRMin=1000,DRMax=2500,DamMin=15,DamMax=30,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=1)
    WeaponsData(13)=(Weap=M4C,DRMin=1900,DRMax=3500,DamMin=20,DamMax=35,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(14)=(Weap=HaloS,DRMin=1900,DRMax=3500,DamMin=15,DamMax=25,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.5,WMClass=1)
    WeaponsData(15)=(Weap=Fiero,DRMin=1900,DRMax=3500,DamMin=20,DamMax=30,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(16)=(Weap=Bizon,DRMin=1900,DRMax=3500,DamMin=15,DamMax=25,HBMHead=1.5,HBMChest=1.2,HBMLeg=0.5,WMClass=1)
    WeaponsData(17)=(Weap=MP5A3,DRMin=1900,DRMax=3500,DamMin=20,DamMax=30,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.6,WMClass=1)
    WeaponsData(18)=(Weap=MP5K,DRMin=1900,DRMax=3500,DamMin=15,DamMax=20,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.5,WMClass=1)
    WeaponsData(19)=(Weap=MP5SD,DRMin=1900,DRMax=3500,DamMin=15,DamMax=20,HBMHead=1.3,HBMChest=1.0,HBMLeg=0.3,WMClass=1)

    WeaponsData(20)=(Weap=RuSpy,DRMin=250,DRMax=1500,DamMin=15,DamMax=60,HBMHead=1.9,HBMChest=1.0,HBMLeg=0.2,WMClass=1)
    WeaponsData(21)=(Weap=M92FP,DRMin=250,DRMax=500,DamMin=18,DamMax=30,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.6,WMClass=1)
    WeaponsData(22)=(Weap=Glock,DRMin=250,DRMax=500,DamMin=19,DamMax=34,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.6,WMClass=1)
    WeaponsData(23)=(Weap=ColtP,DRMin=350,DRMax=900,DamMin=25,DamMax=40,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.7,WMClass=1)
    WeaponsData(24)=(Weap=CombP,DRMin=450,DRMax=900,DamMin=18,DamMax=35,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.6,WMClass=1)
    WeaponsData(25)=(Weap=SOCOM,DRMin=450,DRMax=1000,DamMin=20,DamMax=40,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.7,WMClass=1)
    WeaponsData(26)=(Weap=CompP,DRMin=500,DRMax=1500,DamMin=26,DamMax=40,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.7,WMClass=2)

    WeaponsData(27)=(Weap=AK74,DRMin=1900,DRMax=3500,DamMin=25,DamMax=45,HBMHead=1.5,HBMChest=1.2,HBMLeg=0.7,WMClass=2)
    WeaponsData(28)=(Weap=G3R,DRMin=1900,DRMax=3500,DamMin=35,DamMax=45,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(29)=(Weap=PSG1,DRMin=1900,DRMax=4500,DamMin=65,DamMax=85,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.7,WMClass=2)
    WeaponsData(30)=(Weap=UZI,DRMin=1900,DRMax=3500,DamMin=20,DamMax=28,HBMHead=1.5,HBMChest=1.2,HBMLeg=0.6,WMClass=1)
    WeaponsData(31)=(Weap=FN57P,DRMin=600,DRMax=1300,DamMin=22,DamMax=34,HBMHead=1.4,HBMChest=1.0,HBMLeg=0.4,WMClass=2)
    WeaponsData(32)=(Weap=FNP90,DRMin=1600,DRMax=2000,DamMin=28,DamMax=36,HBMHead=1.5,HBMChest=1.0,HBMLeg=0.4,WMClass=2)
//struct ymWallPerfData
//{
//    var name Material; // Material type name
//    var float Thin; // max thickness for a thin wall
//    var float Med; // max thickness for a medium wall
//    var float Thick; // Thick wall
//    var float ExtraThick;
//}
    WallMatData(0)=(Material=surf_default,Thin=12,Med=38,Thick=54,ExtraThick=64)
    WallMatData(1)=(Material=rock,Thin=12,Med=31,Thick=48,ExtraThick=64)
    WallMatData(2)=(Material=dirt,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(3)=(Material=metal,Thin=8,Med=16,Thick=32,ExtraThick=64)
    WallMatData(4)=(Material=wood,Thin=19,Med=36,Thick=54,ExtraThick=64)
    WallMatData(5)=(Material=plant,Thin=30,Med=45,Thick=60,ExtraThick=72)
    WallMatData(6)=(Material=flesh,Thin=30,Med=45,Thick=54,ExtraThick=64)
    WallMatData(7)=(Material=ice,Thin=20,Med=36,Thick=48,ExtraThick=64)
    WallMatData(8)=(Material=snow,Thin=24,Med=40,Thick=50,ExtraThick=64)
    WallMatData(9)=(Material=water,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(10)=(Material=glass,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(11)=(Material=plaster,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(12)=(Material=plastic,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(13)=(Material=gravel,Thin=16,Med=32,Thick=48,ExtraThick=64)
    WallMatData(14)=(Material=rubber,Thin=16,Med=32,Thick=48,ExtraThick=64)
}
