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

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  6.     path models/weapons/m1_Garand
  7.     skelmodel garand.skd
  8.     surface gun1 shader Garand
  9.     surface gun2 shader Garand
  10.     surface gun3 shader Garand
  11.     surface material8 shader m1clip
  12. }
  13.  
  14. init
  15. {
  16.     server
  17.     {
  18.  
  19.     //========================================//
  20.     //        WEAPON NAME                  //
  21.     //========================================//
  22.  
  23.         classname        Weapon
  24.         weapontype        rifle
  25.         name            "M1 Garand"
  26.         rank            210 210
  27.  
  28.     //========================================//
  29.     //        WEAPON ACCURACY               //
  30.     //========================================//
  31.  
  32. //        M1 Garand: Max Eff. Range is 300 yds with a muzzle velocity of 2800 ft/s. (30-06 Springfield)
  33.  
  34.         sp bulletrange        4000         //the range at which bulletspread is applied
  35.         sp bulletspread        10 10 60 60 //minpitch minyaw maxpitch maxyaw
  36.         sp firespreadmult    0.7 0.685 200 0.8
  37.  
  38.         dm bulletrange        4000
  39.         dm bulletspread        10 10 80 80
  40. //        dm firespreadmult     0.7 0.685 200 0.8
  41.         dm firespreadmult     0.75 0.6 200 0.8
  42.  
  43.         realism bulletrange        4000
  44.         realism bulletspread    4 4 60 60
  45.         realism firespreadmult     0.75 0.6 200 0.8
  46.  
  47.     //========================================//
  48.     //        DAMAGE / RATE OF FIRE          //
  49.     //========================================//
  50.  
  51.         sp bulletdamage        45
  52.         dm bulletdamage        48
  53.  
  54.         sprealism bulletdamage    100
  55.         dmrealism bulletdamage    58
  56.  
  57.         sp firedelay        0.15
  58.         dm firedelay        0.15
  59.         realism firedelay        0.15
  60.  
  61.         realism throughwood        24
  62.         realism throughmetal    8
  63.  
  64.     //========================================//
  65.     //        PLAYER MOVEMENT              //
  66.     //========================================//
  67.  
  68.         sp movementspeed    1.0
  69.         dm movementspeed    0.94
  70.         realism movementspeed    0.94
  71.  
  72.     //========================================//
  73.     //        RIFLE BUTT / SECONDARY FIRE    //
  74.     //========================================//
  75.  
  76.         secondary firetype            melee
  77.         secondary ammotype            none
  78.         secondary ammorequired        0
  79.         secondary meansofdeath        bash
  80.         secondary bulletknockback    50
  81.         secondary quiet
  82.  
  83.         sp secondary bulletrange    64
  84.         sp secondary bulletdamage    60
  85.  
  86.         dm secondary bulletrange    96
  87.         dm secondary bulletdamage    60
  88.  
  89.         realism secondary bulletrange    96
  90.         realism secondary bulletdamage    60
  91.  
  92.     //========================================//
  93.     //        AMMO                      //
  94.     //========================================//
  95.  
  96.         firetype            bullet
  97.         ammotype            "rifle"
  98.         meansofdeath        bullet
  99.         semiauto
  100.         cantpartialreload
  101.         bulletcount            1
  102.         clipsize            8
  103.         ammorequired        1
  104.         bulletlarge            1
  105.  
  106.         sp startammo        8
  107.         dm startammo        64
  108.         sprealism startammo    8
  109.         dmrealism startammo    48
  110.  
  111.         // Additional DM Loadout
  112.         dm additionalstartammo "grenade" 4
  113.         dm additionalstartammo "smokegrenade" 2
  114.         dm startitem "items/binoculars.tik"
  115.  
  116.         // Additional DM Realism Loadout
  117.         dmrealism additionalstartammo "grenade" 4
  118.         dmrealism additionalstartammo "smokegrenade" 2
  119.         dmrealism startitem "items/binoculars.tik"
  120.  
  121.     //========================================//
  122.     //        CROSSHAIR, ZOOM, TRACERS      //
  123.     //========================================//
  124.  
  125.         sp tracerfrequency     2
  126.         dm tracerfrequency     0
  127.         sprealism tracerfrequency     2
  128.         dmrealism tracerfrequency     0
  129.  
  130.         crosshair            1
  131.  
  132.     //========================================//
  133.     //        SOUND, AI, OTHER              //
  134.     //========================================//
  135.  
  136.         surface material8 +nodraw        
  137.  
  138.         pickupsound        m1_snd_pickup
  139.         ammopickupsound    m1_snd_pickup_ammo
  140.         noammosound        m1_snd_noammo
  141.  
  142.         // Holstering info
  143. //        holstertag        "Bip01 Spine2"
  144. //        holsteroffset    "8.0 -7.75 6.5"
  145. //        holsterangles    "0 185 -25"
  146. //        holsterScale    1.0
  147.  
  148.         // AI animation group info
  149.         weapongroup        rifle
  150.         airange            long
  151.  
  152.         // this is attached to the player during reload
  153.         cache models/ammo/garand_clip_reload.tik
  154.     }
  155.     client
  156.     {
  157.         cache tracer.spr
  158.         cache muzsprite.spr
  159.         cache vsssource.spr
  160.         cache models/fx/muzflash.tik
  161.         cache models/ammo/rifleshell.tik
  162.         cache models/fx/snipesmoke.tik
  163.         cache models/ammo/garand_clip_empty.tik
  164.     }
  165. }
  166.  
  167. animations
  168. {
  169.     idle        garand.skc
  170.     idle_empty    garand_empty.skc
  171.     reload        garand_reload.skc
  172.     {
  173.         server
  174.         {
  175.             28 surface material8 -nodraw
  176.             48 surface material8 +nodraw
  177.             last idle
  178.         }
  179.         client
  180.         {
  181.             entry sound m1_snd_reload
  182.         }
  183.     }
  184.     secondaryfire     garand.skc
  185.     {
  186.         server
  187.         {
  188.             entry shoot secondary
  189.         }
  190.     }
  191.     fire    garand_fire.skc
  192.     {
  193.         server
  194.         {
  195.             entry shoot
  196.         }
  197.         client
  198.         {
  199.             entry stopaliaschannel m1_snd_fire
  200.             entry sound m1_snd_fire
  201.  
  202.             // By now, the server has already fired the weapon, so it's
  203.             // ok to apply the view kick apon entry to avoid problems
  204.             // with multiple application on single frame animations.
  205.  
  206.             ////////////////////////////////////////////////////////////////////////////////////////
  207.             // View Kick Controls
  208.             //
  209.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  210.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  211.             // will be explained.
  212.             // Scatter Patterns:
  213.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  214.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction. not used much...too artificial looking
  215.             //
  216.             //
  217.             //                     +-------------------------------------------- Scatter Pitch Min
  218.             //                      |    +--------------------------------------- Scatter Pitch Max
  219.             //                      |    |       +------------------------------- Scatter Yaw Min
  220.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  221.             //                     |    |       |   |     +--------------------- The Recentering speed in fraction per second
  222.             //                      |    |       |   |     |    +---------------- The Scatter Pattern
  223.             //                      |    |       |   |     |    |     +---------- The absolute pitch min/max
  224.             //                      |    |       |   |     |    |     |  +------- The absolute yaw min/max
  225.             //                      |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  226.             //                      |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  227.             //                      |    |       |   |     |    |     |  | |      purely random.
  228.             //                V    V       V   V     V    V     V  V V
  229.  
  230.             entry viewkick         -2.5 -2.5   -0.1 -0.1   0.15   "T"  8.0 8.2 3.6
  231.  
  232. //            entry viewkick         -3.0 -3.0   -0.1 -0.1   0.15   "T"  8.0 8.2 3.6//original recent
  233. //            entry viewkick         -1.0 -1.0   -0.1 -0.1   0.45   "T"  8.0 8.2 3.6//original old
  234.  
  235.             // muzzle flash
  236.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  237.             entry tagspawnlinked tag_barrel
  238.             (
  239.                 count 1
  240.                 model models/fx/muzflash.tik
  241.                 color 0.00 0.00 1.00
  242.                 scale 0.20
  243.                 life 0.01
  244.                 velocity 300.00
  245.                 alignstretch 0.02
  246.                 randomroll
  247.             )
  248.  
  249.             entry tagspawnlinked tag_barrel
  250.             (
  251.                 count 1
  252.                 model muzsprite.spr
  253.                 color 1.00 1.00 1.00
  254.                 scale 0.10
  255.                 scalerate 10
  256.                 life 0.04
  257.             )
  258.  
  259.             entry tagspawn tag_barrel
  260.             (
  261.                 count 1
  262.                 scale .7
  263.                 model models/fx/garandsmoke.tik
  264.             )
  265.  
  266.             // shell eject
  267.             entry tagspawn tag_eject
  268.             (
  269.                 spawnrange 2048
  270.                 count 1
  271.                 model models/ammo/rifleshell.tik
  272.                 scale 1.0
  273.                 velocity 70
  274.                 randvel crandom 10 crandom 10 random 20
  275.                 emitterangles 0 0 0
  276.                 avelocity crandom 90 crandom 90 0
  277.                 accel 0 0 -800
  278.                 life 2.0
  279.                 fadedelay 1.7
  280.                 collision
  281.                 bouncefactor 0.2
  282.                 bouncesoundonce snd_rifle_shell
  283.             )
  284.  
  285.             // smoke puff
  286. //            entry commanddelay 0.05 tagspawn tag_barrel
  287. //            (
  288. //                volumetric
  289. //                model gun            // sets the type of smoke
  290. //                life 10                // amount of smoke
  291. //                scale 1.5            // radius
  292. //                alpha 0.4            // density
  293. //                color 0.7 0.7 0.7        // RBG color of the smoke
  294. //                velocity 2            // base velocity away from the surface
  295. //                randvelaxis random 6 0 0    // velocity offset
  296. //                offsetalongaxis random 4 0 0    // positional offset
  297. //            )
  298.         }
  299.     }
  300.     fire_empty    garand_empty.skc
  301.     {
  302.         server
  303.         {
  304.             entry shoot
  305.         }
  306.         client
  307.         {
  308.             entry stopaliaschannel m1_snd_fire
  309.             entry sound m1_snd_fire
  310.  
  311.             // this view kick needs to match that in the main fire animation
  312.             entry viewkick         -2.5 -2.5   -0.1 -0.1   0.15   "T"  8.0 8.2 3.6
  313.  
  314.             // muzzle flash
  315.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  316.             entry tagspawnlinked tag_barrel
  317.             (
  318.                 count 1
  319.                 model models/fx/muzflash.tik
  320.                 color 0.00 0.00 1.00
  321.                 scale 0.20
  322.                 life 0.01
  323.                 velocity 300.00
  324.                 alignstretch 0.03
  325.                 randomroll
  326.             )
  327.  
  328.             entry tagspawnlinked tag_barrel
  329.             (
  330.                 count 1
  331.                 model muzsprite.spr
  332.                 color 1.00 1.00 1.00
  333.                 scale 0.10
  334.                 scalerate 10
  335.                 life 0.04
  336.             )
  337.  
  338.             entry tagspawn tag_barrel
  339.             (
  340.                 count 1
  341.                 scale .7
  342.                 model models/fx/garandsmoke.tik
  343.             )
  344.  
  345.             // shell eject
  346.             entry tagspawn tag_eject
  347.             (
  348.                 spawnrange 2048
  349.                 count 1
  350.                 model models/ammo/rifleshell.tik
  351.                 scale 1.0
  352.                 velocity 70
  353.                 randvel crandom 10 crandom 10 random 20
  354.                 emitterangles 0 0 0
  355.                 avelocity crandom 90 crandom 90 0
  356.                 accel 0 0 -800
  357.                 physicsrate 20
  358.                 life 2.0
  359.                 fadedelay 1.7
  360.                 collision
  361.                 bouncefactor 0.2
  362.                 bouncesoundonce snd_rifle_shell
  363.             )
  364.  
  365.             // eject the empty clip
  366.             entry commanddelay 0.3 tagspawn tag_eject
  367.             (
  368.                 spawnrange 2048
  369.                 count 1
  370.                 model models/ammo/garand_clip_empty.tik
  371.                 scale 1.0
  372.                 velocity 40
  373.                 randvel crandom 20 crandom 20 60
  374.                 emitterangles 0 0 0
  375.                 avelocity crandom 70 crandom 70 0
  376.                 offset 0 0 2
  377.                 accel 0 0 -800
  378.                 physicsrate 20
  379.                 life 2.0
  380.                 fadedelay 1.7
  381.                 collision
  382.                 bouncefactor 0.2
  383.                 bouncesoundonce snd_rifle_shell
  384.             )
  385.             // and make the *ping* sound
  386.             entry commanddelay 0.3 sound snd_ping
  387.  
  388.             // smoke puff
  389. //            entry commanddelay 0.05 tagspawn tag_barrel
  390. //            (
  391. //                volumetric
  392. //                model gun            // sets the type of smoke
  393. //                life 10                // amount of smoke
  394. //                scale 1.5            // radius
  395. //                alpha 0.4            // density
  396. //                color 0.7 0.7 0.7        // RBG color of the smoke
  397. //                velocity 2            // base velocity away from the surface
  398. //                randvelaxis random 6 0 0    // velocity offset
  399. //                offsetalongaxis random 4 0 0    // positional offset
  400. //            )
  401.         }
  402.     }
  403. }
  404.  
  405. /*QUAKED addon_playerweapon_allied_m1-Garand (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  406. American rifle - M1 Garand.
  407. */