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

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52
  6.     path models/weapons/svt_rifle
  7.     skelmodel svt_rifle.skd
  8.     surface svt_rifle shader svt_rifle
  9.     surface svt_riflecull shader svt_riflecull
  10.     surface svt_lens shader svt_lens
  11. }
  12. $define sounddir sound/weapons
  13.  
  14. init
  15. {
  16.     server
  17.     {
  18.     //========================================//
  19.     //        WEAPON NAME          //
  20.     //========================================//
  21.         classname        Weapon
  22.         weapontype        rifle
  23.         name            "SVT 40"
  24.         rank            230 230
  25.  
  26.     //========================================//
  27.     //        WEAPON ACCURACY       //
  28.     //========================================//
  29.         //SVT-40 Russian Semi-automatic Sniping Rifle
  30.         
  31.         sp bulletrange            4000            //the range at which bulletspread is applied
  32.         sp bulletspread            59 59 140 140        //minpitch minyaw maxpitch maxyaw
  33.         sp zoomspreadmult        0.055            //bulletspread accuracy boost multiplier when zoomed
  34.  
  35.         dm bulletrange            4000
  36.         dm bulletspread            59 59 300 300        //further increased to encourage standing still while firing
  37.                                     //and to counteract the fact that you move slower with the weapon
  38.         dm zoomspreadmult        0.055
  39.  
  40.         realism bulletrange        4000
  41.         realism bulletspread        35 35 80 80
  42.     
  43.         realism zoomspreadmult        0.055
  44.  
  45.     //========================================//
  46.     //        DAMAGE / RATE OF FIRE      //
  47.     //========================================//
  48.         sp bulletdamage            50
  49.         dm bulletdamage            50
  50.         sprealism bulletdamage        50    
  51.         dmrealism bulletdamage        50
  52.  
  53.         sp firedelay            0.85
  54.         dm firedelay            0.85
  55.         realism firedelay        0.85
  56.  
  57.         realism throughwood        24
  58.         realism throughmetal        8
  59.  
  60.     //========================================//
  61.     //        PLAYER MOVEMENT          //
  62.     //========================================//
  63.         sp movementspeed        0.88
  64.         sp zoommovement            0.5
  65.  
  66.         dm movementspeed        0.79
  67.         dm zoommovement            0.5
  68.  
  69.         realism movementspeed        0.79
  70.         realism zoommovement        0.5
  71.  
  72.     //========================================//
  73.     //        RIFLE BUTT / SECONDARY FIRE//
  74.     //========================================//
  75.  
  76.     //========================================//
  77.     //        AMMO              //
  78.     //========================================//
  79.         firetype            bullet
  80.         ammotype            "rifle"
  81.         meansofdeath            bullet
  82.         semiauto
  83.         clipsize            10
  84.         ammorequired            1
  85.         bulletlarge            1
  86.  
  87.         sp startammo            10
  88.         dm startammo            40
  89.         sprealism startammo        20
  90.         dmrealism startammo        30
  91.  
  92.         // Additional DM Loadout
  93.         dm additionalstartammo "grenade" 1
  94. //        dm additionalstartammo "smokegrenade" 1
  95.  
  96.         // Additional DM Realism Loadout
  97.         dmrealism additionalstartammo "grenade" 1
  98. //        dmrealism additionalstartammo "smokegrenade" 1
  99.  
  100.     //========================================//
  101.     //        CROSSHAIR, ZOOM, TRACERS  //
  102.     //========================================//
  103.         crosshair            1
  104.         zoom                20
  105.  
  106.     //========================================//
  107.     //        SOUND, AI, OTHER      //
  108.     //========================================//
  109.         // AI animation group info
  110.         weapongroup            rifle
  111.         airange                sniper    
  112.  
  113.         pickupsound            springfield_snd_pickup
  114.         ammopickupsound            springfield_snd_pickup_ammo
  115.         noammosound            springfield_snd_noammo
  116.     }
  117.     client
  118.     {
  119.         // this is attached to the player during reload
  120.         cache models/ammo/svt_clip_reload.tik
  121.  
  122.         cache muzsprite.spr
  123.         cache vsssource.spr
  124.         cache models/fx/muzflash.tik
  125.         cache models/fx/snipesmoke.tik
  126.         cache models/ammo/rifleshell.tik
  127.     }
  128. }
  129.  
  130. animations
  131. {
  132.     idle        svt_rifle.skc
  133.  
  134.     reload        svt_reload.skc
  135.     {
  136.         server
  137.         {
  138.             19 surface svt_riflecull +nodraw
  139.             42 surface svt_riflecull -nodraw
  140.             last idle
  141.         }
  142.         client
  143.         {
  144.             entry sound svt40_snd_reload
  145.         }
  146.     }
  147.     fire    svt_rifle.skc
  148.     {
  149.         server
  150.         {
  151.             entry shoot
  152.         }
  153.         client
  154.         {
  155.             entry stopaliaschannel svt40_snd_fire
  156.             entry sound svt40_snd_fire
  157.  
  158.             // By now, the server has already fired the weapon, so it's
  159.             // ok to apply the view kick apon entry to avoid problems
  160.             // with multiple application on single frame animations.
  161.  
  162.             ////////////////////////////////////////////////////////////////////////////////////////
  163.             // View Kicking
  164.             //
  165.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  166.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  167.             // will be explained.
  168.             // Scatter Patterns:
  169.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  170.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  171.             //
  172.             //
  173.             //                     +-------------------------------------------- Scatter Pitch Min
  174.             //                      |    +--------------------------------------- Scatter Pitch Max
  175.             //                      |    |       +------------------------------- Scatter Yaw Min
  176.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  177.             //                     |    |       |   |     +--------------------- The Recentering speed in degrees per second
  178.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  179.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  180.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  181.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  182.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  183.             //                      |    |       |   |     |    |     |  | |      purely random.
  184.             //                V    V       V   V     V    V     V  V V
  185.             entry viewkick          -16.0 -12.0   -10.0 10.0 1.5 "T"    14  14 14
  186.  
  187.             // muzzle flash
  188.             entry tagdlight tag_barrel 0.3 0.20 0.175 300 0.25 -1.0 -0.75 -0.2
  189.  
  190.             entry tagspawnlinked tag_barrel
  191.             (
  192.                 count 1
  193.                 model models/fx/muzflash.tik
  194.                 color 0.00 0.00 1.00
  195.                 scale 0.07
  196.                 life 0.01
  197.                 velocity 300.00
  198.                 offsetalongaxis 3 0 0
  199.                 alignstretch 0.08
  200.                 randomroll
  201.             )
  202.  
  203.             entry tagspawnlinked tag_barrel
  204.             (
  205.                 count 1
  206.                 model muzsprite.spr
  207.                 color 1.00 1.00 1.00
  208.                 scale 0.09
  209.                 life 0.04
  210.                 offsetalongaxis 4 0 0
  211.             )
  212.  
  213.             entry commanddelay 0.020 tagspawn tag_barrel
  214.             (
  215.                 spawnrate 1.00
  216.                 model vsssource.spr
  217.                 count 1
  218.                 alpha 0.10
  219.                 color 1.00 1.00 1.00
  220.                 spritegridlighting
  221.                 scale 0.09
  222.                 life .9
  223.                 scalerate 23.00
  224.                 velocity 429.00
  225.                 accel 0.00 20.00 30.00
  226.                 friction 2.00
  227.                 fade
  228.                 offsetalongaxis random 4 0 0
  229.             )
  230.  
  231.             entry tagspawn tag_barrel
  232.             (
  233.                 count 1
  234.                 scale .7
  235.                 model models/fx/snipesmoke.tik
  236.             )
  237.  
  238.             entry tagspawn tag_eject 1024
  239.             (
  240.                 spawnrange 2048
  241.                 count 1
  242.                 model models/ammo/rifleshell.tik
  243.                 scale 1.0
  244.                 velocity 70
  245.                 randvel crandom 10 crandom 10 random 20
  246.                 emitterangles 0 0 0
  247.                 avelocity crandom 90 crandom 90 0
  248.                 accel 0 0 -800
  249.                 physicsrate 20
  250.                 life 2.0
  251.                 fadedelay 1.7
  252.                 collision
  253.                 bouncefactor 0.2
  254.                 bouncesoundonce snd_rifle_shell
  255.             )
  256.         }
  257.     }
  258. }
  259.  
  260. /*QUAKED addon_playerweapon_soviet_svt40 (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  261. Soviet sniper rifle - Tokarev 1940 SVT40.
  262. */