Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.72 KB | None | 0 0
  1. class CfgSkeletons
  2. {
  3.     class Default
  4.         {
  5.             isDiscrete = 1;
  6.             skeletonInherit = "";
  7.             skeletonBones[] = {};
  8.         };
  9.  
  10.     class Weapon: Default
  11.     {
  12.         isDiscrete=1;
  13.         skeletonInherit="Default";
  14.         skeletonBones[]=
  15.         {
  16.             "magazine_loaded","",
  17.             "trigger",""
  18.         };
  19.     };
  20.     class Rifle: Weapon
  21.     {
  22.         skeletonInherit="Weapon";
  23.         skeletonBones[]=
  24.         {
  25.             //"bolt","",
  26.             //"bullet_cover","",
  27.             //"aimpoint_cover","",
  28.             //"aimpoint_cover02","",
  29.             //"charging_handle","",
  30.             //"misc_cover",""
  31.         };
  32.     };
  33.     class Pistol: Weapon
  34.     {
  35.         skeletonInherit="Weapon";
  36.         skeletonBones[]=
  37.         {
  38.             "slide","",
  39.             "hammer","",
  40.             "safety",""
  41.         };
  42.     };
  43. };
  44.  
  45. class CfgModels
  46. {
  47.     class Default
  48.         {
  49.             sections[] = {};
  50.             sectionsInherit="";
  51.             skeletonName = "";
  52.         };
  53.  
  54.     class Optic: Default
  55.     {
  56.         sections[]=
  57.         {
  58.             "zasleh"
  59.         };
  60.     };
  61.     class Weapon: Default
  62.     {
  63.         sections[]=
  64.         {
  65.             "zasleh"
  66.         };
  67.        
  68.         htMin = 1;      // Minimum half-cooling time (in seconds)
  69.         htMax = 600;    // Maximum half-cooling time (in seconds)
  70.         afMax = 0;      // Maximum temperature in case the model is alive (in celsius)
  71.         mfMax = 0;      // Maximum temperature when the model is moving (in celsius)
  72.         mFact = 1;      // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
  73.         tBody = 100;     // Metabolism temperature of the model (in celsius)
  74.        
  75.         skeletonName="Weapon";
  76.         class Animations
  77.         {
  78.             class zaslehROT
  79.             {
  80.                 type="rotationX";
  81.                 source="ammoRandom";      //use ammo count as phase for animation
  82.                 sourceAddress="loop";     //loop when phase out of bounds
  83.                 selection="zasleh";  //selection we want to rotate
  84.                 axis="";                  //no own axis - center of rotation is computed from selection
  85.                 centerFirstVertex=true;   //use first vertex of selection as center of rotation
  86.                 minValue=0;
  87.                 maxValue=4;               //rotation angle will be 360/4 = 90 degrees
  88.                 angle0="rad 0";
  89.                 angle1="rad 360";
  90.             };
  91.             class safety_rotation
  92.             {
  93.                 type="rotationZ";
  94.                 source="weaponMuzzle";
  95.                 sourceAddress = "clamp";
  96.                 selection="safety";
  97.                 axis="safety_axis";
  98.                 memory=1;
  99.                 minValue=0.000000;
  100.                 maxValue=1.000000;
  101.                 angle0=0.0;//"rad 0"
  102.                 angle1=-0.03;//"rad -10"
  103.             };
  104.             class magazine_hide
  105.             {
  106.                 type="hide";
  107.                 source="reloadMagazine";
  108.                 sourceAddress="mirror";
  109.                 selection="magazine_loaded";
  110.                 minValue=0.0;
  111.                 maxValue=1.0;
  112.                 hideValue=0.2;//0.15
  113.                 unhideValue = 0.76;//0.8
  114.             };
  115.             class reload_ammobelt_hide: magazine_hide
  116.             {
  117.                 selection="ammo_belt";
  118.             };
  119.             class reload_ammobelt_bottom_hide: magazine_hide
  120.             {
  121.                 selection="ammo_belt_bottom";
  122.             };
  123.             class ammobelt_hide: magazine_hide
  124.             {
  125.                 source="isEmpty";
  126.                 selection="ammo_belt";
  127.                 minValue=0.000000;
  128.                 maxValue=1.000000;
  129.                 hideValue=1.000000;
  130.             };
  131.             class ammobelt_bottom_hide: ammobelt_hide
  132.             {
  133.                 selection="ammo_belt_bottom";
  134.             };
  135.             class no_magazine
  136.             {
  137.                 type="hide";
  138.                 source="hasMagazine";
  139.                 selection="magazine_loaded";
  140.                 minValue=0.000000;
  141.                 maxValue=1.00000;
  142.                 hideValue=0.5;
  143.                 unhideValue = -1.0;
  144.             };
  145.             class magazine_reload_move_1
  146.             {
  147.                 type = "translation";
  148.                 source = "reloadMagazine";
  149.                 selection = "magazine_loaded";
  150.                 axis = "magazine_axis";
  151.                 minValue = 0.07;
  152.                 maxValue = 0.2;//0.1 works
  153.                 offset0 = 0.0;
  154.                 offset1 = 1.0;//0.5 works
  155.             };
  156.             class magazine_reload_move_2: magazine_reload_move_1
  157.             {
  158.                 //source = "reloadMagazine2";
  159.                 minValue = 0.65;
  160.                 maxValue = 1.0;
  161.                 offset0 = 0.0;
  162.                 offset1 = -1.1;
  163.             };
  164.         };
  165.     };
  166.  
  167.     class Pistol: Weapon
  168.     {
  169.         skeletonName="Pistol";
  170.         class Animations: Animations
  171.         {
  172.             class trigger /// not in this model, but good to use
  173.             {
  174.                 type = "rotation";
  175.                 source = "reload";
  176.                 sourceAddress = "clamp";
  177.                 selection = "trigger";
  178.                 axis = "trigger_axis";
  179.                 minValue = 0;
  180.                 maxValue = "1";
  181.                 angle0 = "0";
  182.                 angle1 = "rad 5";
  183.             };
  184.           class magazine_hide:magazine_hide
  185.             {
  186.                 sourceAddress="mirror";
  187.                 minValue=0.0;
  188.                 maxValue=0.56;
  189.                 hideValue=0.25;//was 0.36
  190.             };
  191.             class slide_fire_begin
  192.             {
  193.                 type="translation";
  194.                 source="reload";
  195.                 selection="slide";
  196.                 axis="slide_axis";
  197.                 minValue=0.000000;
  198.                 maxValue=0.500000;//0.5
  199.                 offset0=0;
  200.                 offset1=-0.200000;//0.2
  201.             };
  202.             class slide_fire_end:slide_fire_begin
  203.             {
  204.                 minValue=0.5300000;
  205.                 maxValue=1.000000;
  206.                 offset0=0;
  207.                 offset1=0.200000;//0.2
  208.             };
  209.             class slide_empty
  210.             {
  211.                 type="translation";
  212.                 source="isEmpty";
  213.                 selection="slide";
  214.                 axis="slide_axis";
  215.                 minValue=0.990000;
  216.                 maxValue=1.000000;
  217.                 offset0=0;
  218.                 offset1=-0.200000;
  219.             };
  220.             class slidesafety_fire_begin:slide_fire_begin
  221.             {
  222.                 selection="safety";
  223.             };
  224.             class slidesafety_empty:slide_empty
  225.             {
  226.                 selection="safety";
  227.             };
  228.             class hammer_fire_begin
  229.             {
  230.                 type="rotation";
  231.                 source="reload";
  232.                 selection="hammer";
  233.                 axis="hammer_axis";
  234.                 memory=1;
  235.                 minValue=0.000000;
  236.                 maxValue=0.500000;//0.5
  237.                 angle0=0.000000;
  238.                 angle1=0.085;//1.221730
  239.             };
  240.             class hammer_fire_end:hammer_fire_begin
  241.             {
  242.                 minValue=0.520000;
  243.                 maxValue=1.000000;
  244.                 angle0=0.000000;
  245.                 angle1=-0.085;//-1.221730
  246.             };
  247.             class hammer_empty
  248.             {
  249.                 type="rotation";
  250.                 source="isEmpty";
  251.                 selection="hammer";
  252.                 axis="hammer_axis";
  253.                 memory=1;
  254.                 //minValue=0.990000;
  255.                 //maxValue=1.000000;
  256.                 minValue=0.500000;
  257.                 maxValue=0.800000;
  258.                 angle0=0.000000;
  259.                 angle1=0.000000;//1.000000
  260.                 //angle1=1.221730;
  261.             };
  262.         };
  263.     };
  264.  
  265.     class bek_makarov: Pistol {};
  266.  
  267. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement