home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / ppsh_smg.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  8.6 KB  |  323 lines

  1. TIKI
  2. setup
  3. {
  4.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  5.     path models/weapons/ppsh_smg
  6.     skelmodel ppsh_smg.skd
  7.     surface ppsh_smg shader ppsh_smg
  8.     surface ppsh_smgbarrel shader ppsh_smgcull
  9.     surface ppsh_smgcull shader ppsh_smg
  10. }
  11.  
  12. init
  13. {
  14.     server
  15.     {
  16.     //========================================//
  17.     //        WEAPON NAME          //
  18.     //========================================//
  19.  
  20.         classname        Weapon
  21.         weapontype        smg
  22.         name            "PPSH SMG"
  23.         rank            330 330
  24.  
  25.     //========================================//
  26.     //        WEAPON ACCURACY       //
  27.     //========================================//
  28.  
  29. //        Thompson SMG: Max Eff. Range is 50 yds with a muzzle velocity of 805 ft/s. (.45 ACP round)
  30.  
  31.         sp bulletrange        4000             //the range at which bulletspread is applied
  32.         sp bulletspread        45 45 72 72     //minpitch minyaw maxpitch maxyaw original 55 55 72 72
  33.         sp firespreadmult    0.08 0.35 200 0.25  //add falloff cap maxtime
  34.  
  35.         dm bulletrange        4000
  36.         dm bulletspread        40 40 50 50            //32 32 50 50         //26 26 48 48        //50 50 120 120        //53 53 70 70    //45 45 72 72
  37.         dm firespreadmult    0.3 0.6 150 0.25        //0.08 0.35 200 0.25    //0.3 0.8 200 0.4 original
  38.  
  39.         realism bulletrange        4000
  40.         realism bulletspread        40 40 50 50            //32 32 50 50         //26 26 48 48        //50 50 120 120        //53 53 70 70    //45 45 72 72
  41.         realism firespreadmult    0.3 0.6 150 0.25        //0.08 0.35 200 0.25    //0.3 0.8 200 0.4 original
  42.  
  43.     //========================================//
  44.     //        DAMAGE / RATE OF FIRE      //
  45.     //========================================//
  46.  
  47.         sp bulletdamage        35            //damage per round original 25
  48.         dm bulletdamage        25                //26    
  49.         realism bulletdamage    28                //26    
  50.  
  51.         sp firedelay        0.1 //(700 rpm)
  52.         dm firedelay        0.1
  53.         realism firedelay    0.1
  54.  
  55.     //========================================//
  56.     //        PLAYER MOVEMENT          //
  57.     //========================================//
  58.  
  59.         sp movementspeed         1.0    
  60.         dm movementspeed        0.92
  61.         realism movementspeed    0.92
  62.  
  63.     //========================================//
  64.     //        RIFLE BUTT / SECONDARY FIRE//
  65.     //========================================//
  66.  
  67.         secondary firetype            melee
  68.         secondary ammotype            none
  69.         secondary ammorequired        0
  70.         secondary meansofdeath        bash
  71.         secondary bulletknockback    50
  72.         secondary quiet
  73.  
  74.         sp secondary bulletrange    64
  75.         sp secondary bulletdamage    60
  76.  
  77.         dm secondary bulletrange    96
  78.         dm secondary bulletdamage    60
  79.  
  80.         realism secondary bulletrange    96
  81.         realism secondary bulletdamage    60
  82.  
  83.     //========================================//
  84.     //        AMMO              //
  85.     //========================================//
  86.  
  87.         firetype        bullet
  88.         ammotype        "smg"
  89.         meansofdeath    bullet
  90.         bulletcount        1
  91.         clipsize        46
  92.         ammorequired    1
  93.  
  94.         sp startammo    80
  95.         dm startammo    180
  96.         sprealism startammo    80
  97.         dmrealism startammo    135
  98.  
  99.         // Additional DM Loadout
  100.         dm additionalstartammo "grenade" 2
  101.         dm additionalstartammo "smokegrenade" 1
  102.         dm startitem "items/binoculars.tik"
  103.  
  104.         // Additional DM Realism Loadout
  105.         dmrealism additionalstartammo "grenade" 2
  106.         dmrealism additionalstartammo "smokegrenade" 1
  107.         dmrealism startitem "items/binoculars.tik"
  108.  
  109.     //========================================//
  110.     //        CROSSHAIR, ZOOM, TRACERS  //
  111.     //========================================//
  112.  
  113.         sp tracerfrequency     3
  114.         dm tracerfrequency     0
  115.         sprealism tracerfrequency     3
  116.         dmrealism tracerfrequency     0
  117.  
  118.         crosshair        1
  119.  
  120.     //========================================//
  121.     //        SOUND, AI, OTHER      //
  122.     //========================================//
  123.  
  124.  
  125.         pickupsound        thompson_snd_pickup
  126.         ammopickupsound    thompson_snd_pickup_ammo
  127.         noammosound        thompson_snd_noammo
  128.  
  129.         // Holstering info
  130. //        holstertag        "Bip01 Spine2"
  131. //        holsteroffset    "8.0 -7.75 6.5"
  132. //        holsterangles    "0 185 -25"
  133. //        holsterScale    1.0
  134.         
  135.         // AI animation group info
  136.         weapongroup        thompson
  137.         airange            short
  138.  
  139.         // this is attached to the player during reload
  140.         cache models/ammo/ppsh_clip_reload.tik    
  141.     }
  142.     client
  143.     {
  144.         cache tracer.spr
  145.         
  146.         cache muzsprite.spr
  147.         cache models/ammo/pistolshell.tik
  148.     }
  149. }
  150.  
  151. animations
  152. {
  153.     idle    ppsh_smg.skc
  154.     reload    ppsh_smg.skc        crossblend 0.1
  155.     {
  156.         server
  157.         {
  158.             44 surface ppsh_smgcull +nodraw
  159.             60 surface ppsh_smgcull -nodraw
  160.             last idle
  161.         }
  162.         client
  163.         {
  164.             entry sound ppsh41_snd_reload
  165.         }
  166.     }
  167.     secondaryfire     ppsh_smg.skc
  168.     {
  169.         server
  170.         {
  171.             entry shoot secondary
  172.         }
  173.     }
  174.     fire    ppsh_smg.skc
  175.     {
  176.         server
  177.         {
  178.             entry shoot
  179.         }
  180.         client
  181.         {
  182.             entry stopaliaschannel ppsh41_snd_fire
  183.             entry sound ppsh41_snd_fire
  184.  
  185.             // By now, the server has already fired the weapon, so it's
  186.             // ok to apply the view kick apon entry to avoid problems
  187.             // with multiple application on single frame animations.
  188.  
  189.             ////////////////////////////////////////////////////////////////////////////////////////
  190.             // View Kicking
  191.             //
  192.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  193.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  194.             // will be explained.
  195.             // Scatter Patterns:
  196.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  197.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  198.             //
  199.             //
  200.             //                     +-------------------------------------------- Scatter Pitch Min
  201.             //                      |    +--------------------------------------- Scatter Pitch Max
  202.             //                      |    |       +------------------------------- Scatter Yaw Min
  203.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  204.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  205.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  206.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  207.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  208.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  209.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  210.             //                      |    |       |   |     |    |     |  | |      purely random.
  211.             //                V    V       V   V     V    V     V  V V
  212.             entry viewkick         -1.58 -1.58  -0.16 -0.16 0.9   "V"   8.5 8.6 16.0
  213.  
  214. //            entry viewkick         -2.25 -2.25  -0.16 -0.16 1   "V"   8.5 8.6 16.0 (original)
  215.  
  216.  
  217.             // muzzle flash
  218.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  219. // Commented out to prevent hitting the max anim command error
  220.             entry tagspawnlinked tag_barrel
  221.             (
  222.                 model muzsprite.spr
  223.                 color 1.00 1.00 1.00
  224.                 scale 0.30
  225.                 life 0.05
  226.                 scalerate 10.00
  227.                 velocity 4.00
  228.                 offsetalongaxis 7 0 0
  229.                 angles 0 0 crandom -30
  230.                 avelocity 0 0 crandom -30
  231.             )
  232.  
  233.             entry tagspawnlinked tag_barrel
  234.             (
  235.                 model muzsprite.spr
  236.                 color 1.00 1.00 1.00
  237.                 life 0.06
  238.                 scale 0.30
  239.                 velocity 3.00
  240.                 scalerate 10.00
  241.                 offsetalongaxis 3 0 0
  242.                 angles 0 0 crandom 400
  243.                 avelocity 0 0 crandom 300
  244.                 fade
  245.             )
  246.  
  247.             entry tagspawnlinked tag_barrel
  248.             (
  249.                 model muzsprite.spr
  250.                 color 1.00 1.00 1.00
  251.                 scale 0.30
  252.                 life 0.07
  253.                 scalerate 10.00
  254.                 offsetalongaxis 10 0 0
  255.                 fade
  256.             )
  257.  
  258.             entry tagspawn tag_barrel
  259.             (
  260.                 model vsssource2.spr
  261.                 alpha 0.13
  262.                 color 1.00 1.00 1.00
  263.                 spritegridlighting
  264.                 scale 0.10
  265. //                life 1.00
  266.                 life 0.30 //orig 1.0
  267.                 scalerate 7.00
  268.                 velocity 100.00
  269.                 accel 0.00 0.00 100.00
  270.                 friction 4.00
  271.                 offsetalongaxis range 23 -25 0 0
  272.                 scalemin 0.10
  273.                 scalemax 0.50
  274.                 fade
  275.                 randomroll
  276.             )
  277.  
  278.             // shell eject
  279.             entry commanddelay 0.1 tagspawn tag_eject
  280.             (
  281.                 spawnrange 2048
  282.                 count 1
  283.                 model models/ammo/pistolshell.tik
  284.                 velocity 50
  285.                 emitterangles 0 0 -80
  286.                 randvel crandom 10 crandom 10 random 20
  287.                 avelocity crandom 90 crandom 90 0
  288.                 accel 0 0 -800
  289.                 physicsrate 20
  290.                 life 2.0
  291.                 fadedelay 1.7
  292.                 collision
  293.                 bouncefactor 0.2
  294.                 bouncesoundonce snd_pistol_shell
  295.             )
  296.  
  297.             // smoke puff
  298.             entry tagspawn tag_eject
  299.             (
  300.                 model vsssource2.spr
  301.                 alpha 0.10
  302.                 color 1.00 1.00 1.00
  303.                 spritegridlighting
  304.                 scale 0.10
  305. //                life 1.00
  306.                 life 0.30 //orig 1.0
  307.                 scalerate 7.00
  308.                 velocity 100.00
  309.                 accel 0.00 0.00 100.00
  310.                 friction 4.00
  311.                 offsetalongaxis range 13 -15 0 0
  312.                 scalemin 0.10
  313.                 scalemax 0.50
  314.                 fade
  315.                 randomroll
  316.             )
  317.         }
  318.     }
  319. }
  320.  
  321. /*QUAKED addon_playerweapon_soviet_ppsh41 (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  322. Soviet submachine gun - PPSh41.
  323. */