home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / enfield.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  8.2 KB  |  341 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/enfield
  7.     skelmodel enfield.skd
  8.     surface enfield shader enfield
  9.     surface enfieldcull shader enfieldcull
  10.     surface enfieldbolt shader enfield
  11. }
  12.  
  13. init
  14. {
  15.     server
  16.         {
  17.     //========================================//
  18.     //        WEAPON NAME                  //
  19.     //========================================//
  20.  
  21.         classname        Weapon
  22.         weapontype        rifle
  23.         name            "Lee-Enfield"
  24.         rank            220 220
  25.  
  26.     //========================================//
  27.     //        WEAPON ACCURACY               //
  28.     //========================================//
  29. //        Lee Enfield Rifle No. 4: Max Eff. Range is 400 yds with a muzzle velocity of 2200 ft/s. (.303 British)
  30.  
  31.         sp bulletrange        4000             //the range at which bulletspread is applied
  32.         sp bulletspread        10 10 65 65     //minpitch minyaw maxpitch maxyaw
  33.  
  34.         dm bulletrange        4000
  35.         dm bulletspread        4 4 65 65
  36.  
  37.         realism bulletrange    4000
  38.         realism bulletspread    6 6 75 75
  39.  
  40.     //========================================//
  41.     //        DAMAGE / RATE OF FIRE          //
  42.     //========================================//
  43.  
  44.         sp bulletdamage        75
  45.         dm bulletdamage        70
  46.  
  47.         sprealism bulletdamage    100    
  48.         dmrealism bulletdamage    100
  49.  
  50.         sp firedelay         1.2    //was 1.45
  51.         dm firedelay        1.1    //was 1.45
  52.         realism firedelay        1.1    //was 1.45
  53.  
  54.         realism throughwood    24
  55.         realism throughmetal    8
  56.  
  57.     //========================================//
  58.     //        PLAYER MOVEMENT              //
  59.     //========================================//
  60.  
  61.         sp movementspeed        0.94
  62.         dm movementspeed        1.05
  63.         realism movementspeed        1.05
  64.  
  65.     //========================================//
  66.     //        RIFLE BUTT / SECONDARY FIRE    //
  67.     //========================================//
  68.  
  69.         secondary firetype        melee
  70.         secondary ammotype        none
  71.         secondary ammorequired        0
  72.         secondary meansofdeath        bash
  73.         secondary bulletknockback    50
  74.         secondary quiet
  75.  
  76.         sp secondary bulletrange    64
  77.         sp secondary bulletdamage    60
  78.  
  79.         dm secondary bulletrange    96
  80.         dm secondary bulletdamage    60
  81.  
  82.         realism secondary bulletrange        96
  83.         realism secondary bulletdamage    60
  84.  
  85.     //========================================//
  86.     //        AMMO                      //
  87.     //========================================//
  88.  
  89.         firetype        bullet
  90.         ammotype        "rifle"
  91.         meansofdeath    bullet
  92.         semiauto
  93.         bulletcount        1
  94.         clipsize        10
  95.         ammorequired    1
  96.         bulletlarge        1
  97.  
  98.         sp startammo    10
  99.         dm startammo    70
  100.         sprealism startammo    10
  101.         dmrealism startammo    50
  102.  
  103.         // Additional DM Loadout
  104.         dm additionalstartammo "grenade" 4
  105.         dm additionalstartammo "smokegrenade" 2
  106.         dm startitem "items/binoculars.tik"
  107.  
  108.         // Additional DM Realism Loadout
  109.         dmrealism additionalstartammo "grenade" 4
  110.         dmrealism additionalstartammo "smokegrenade" 2
  111.         dmrealism startitem "items/binoculars.tik"
  112.  
  113.     //========================================//
  114.     //        CROSSHAIR, ZOOM, TRACERS      //
  115.     //========================================//
  116.  
  117.         sp tracerfrequency         2 //original 0
  118.         dm tracerfrequency         0
  119.         sprealism tracerfrequency     0 //original 2
  120.         dmrealism tracerfrequency     0
  121.  
  122.         crosshair        1
  123.  
  124.     //========================================//
  125.     //        SOUND, AI, OTHER              //
  126.     //========================================//
  127.  
  128.         pickupsound        kar98_snd_pickup
  129.         ammopickupsound        kar98_snd_pickup_ammo
  130.         noammosound        kar98_snd_noammo
  131.  
  132.         // Holstering info
  133. //        holstertag        "Bip01 Spine2"
  134. //        holsteroffset        "8.0 -7.75 6.5"
  135. //        holsterangles        "0 185 -25"
  136. //        holsterScale        1.0
  137.  
  138.         // AI animation group info
  139.         weapongroup        rifle
  140.         airange            long
  141.  
  142.         // this is attached to the player during reload
  143.         cache models/ammo/kar98_clip_reload.tik
  144.     }
  145.     client
  146.     {
  147.         cache tracer.spr
  148.         cache muzsprite.spr
  149.         cache models/fx/snipesmoke.tik
  150.         cache models/ammo/rifleshell.tik
  151.     }
  152. }
  153.  
  154. animations
  155. {
  156.     idle        enfield.skc
  157.     {
  158.     }
  159.  
  160.     reload    enfield_reload.skc // this is the start of the reloading sequence
  161.     {
  162.         client
  163.         {
  164.             entry sound enfield_snd_reload item
  165.         }
  166.         server
  167.         {
  168.     
  169.             last idle
  170.         }
  171.     }
  172.     reload_single enfield_reload.skc // this is the reload loop that loads in a single shell
  173.     {
  174.         client
  175.         {
  176.             entry sound kar98_snd_reload_single item
  177.         }
  178.     }
  179.     reload_end enfield.skc
  180.     {
  181.         server
  182.         {
  183.             last idle
  184.         }
  185.         client
  186.         {
  187.             entry sound kar98_snd_reload_end item
  188.         }
  189.     }
  190.     rechamber    enfield_rechamber.skc
  191.     {
  192.         client
  193.         {
  194.             entry sound kar98_snd_bolt item
  195.             18 tagspawn tag_eject 1024
  196.             (
  197.                 spawnrange 2048
  198.                 count 1
  199.                 model models/ammo/rifleshell.tik
  200.                 scale 1.0
  201.                 velocity 70
  202.                 randvel crandom 10 crandom 10 random 20
  203.                 emitterangles 0 0 0
  204.                 avelocity crandom 90 crandom 90 0
  205.                 accel 0 0 -800
  206.                 physicsrate 20
  207.                 life 2.0
  208.                 fadedelay 1.7
  209.                 collision
  210.                 bouncefactor 0.2
  211.                 bouncesoundonce snd_rifle_shell
  212.             )
  213.         }
  214.     }
  215.     secondaryfire     enfield.skc
  216.     {
  217.         server
  218.         {
  219.             entry shoot secondary
  220.         }
  221.     }
  222.     fire        enfield.skc
  223.     {
  224.         server
  225.         {
  226.             entry shoot
  227.         }
  228.         client
  229.         {
  230.             entry stopaliaschannel enfield_snd_fire
  231.             entry sound enfield_snd_fire
  232.  
  233.             // By now, the server has already fired the weapon, so it's
  234.             // ok to apply the view kick apon entry to avoid problems
  235.             // with multiple application on single frame animations.
  236.  
  237.             ////////////////////////////////////////////////////////////////////////////////////////
  238.             // View Kicking
  239.             //
  240.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  241.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  242.             // will be explained.
  243.             // Scatter Patterns:
  244.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  245.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  246.             //
  247.             //
  248.             //                 +-------------------------------------------- Scatter Pitch Min
  249.             //                  |      +--------------------------------------- Scatter Pitch Max
  250.             //              |        |       +------------------------------- Scatter Yaw Min
  251.             //                 |        |       |   +--------------------------- Scatter Yaw Max
  252.             //                 |        |       |   |     +--------------------- The Recentering speed in fraction per second
  253.             //                  |       |       |   |     |    +---------------- The Scatter Pattern
  254.             //                 |        |       |   |     |    |     +---------- The absolute pitch min/max
  255.             //                 |        |       |   |     |    |     |  +------- The absolute yaw min/max
  256.             //                 |        |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  257.             //                 |        |       |   |     |    |     |  | |      control of the weapon and its behavior is
  258.             //                 |        |       |   |     |    |     |  | |      purely random.
  259.             //            V        V       V   V     V    V     V  V V
  260.             entry viewkick  -1.5 -2.0    -0.5 -0.5 4.5  "T"   5.0 2.0 5
  261.  
  262.             // muzzle flash
  263.             entry tagdlight tag_barrel 0.25 0.2 0.15 150 0.11
  264.             entry tagspawnlinked tag_barrel
  265.             (
  266.                 model muzsprite.spr
  267.                 count 1
  268.                 alpha .5
  269.                 color 1.00 1.00 1.00
  270.                 varycolor
  271.                 scale 0.70
  272.                 life 0.05
  273.                 scalerate 1.00
  274.                 velocity 4.00
  275.                 friction 3.00
  276.                 fade
  277.                 alignstretch 1.00
  278.                 randomroll
  279.             )
  280.             entry tagspawnlinked tag_barrel
  281.             (
  282.                 model muzsprite.spr
  283.                 count 1
  284.                 alpha .5
  285.                 color 1.00 1.00 1.00
  286.                 scale 0.60
  287.                 life 0.05
  288.                 scalerate 0.70
  289.                 velocity 17.00
  290.                 offsetalongaxis 5 0 0
  291.                 fade
  292.                 alignstretch 0.40
  293.                 randomroll
  294.             )
  295.  
  296.             entry tagspawnlinked tag_barrel
  297.             (
  298.                 model muzsprite.spr
  299.                 count 1
  300.                 alpha .5
  301.                 color 1.00 1.00 1.00
  302.                 scale 0.60
  303.                 life 0.05
  304.                 velocity 18.00
  305.                 offsetalongaxis 9 0 0
  306.                 fade
  307.             )
  308.  
  309.             // smoke puff used on sniper version of kar98
  310.             entry commanddelay 0.020 tagspawn tag_barrel
  311.             (
  312.                 model vsssource.spr
  313.                 count 1
  314.                 alpha 0.10
  315.                 color 1.00 1.00 1.00
  316.                 spritegridlighting
  317.                 scale 0.09
  318.                 life .9
  319.                 scalerate 23.00
  320.                 velocity 429.00
  321.                 accel 0.00 20.00 30.00
  322.                 friction 2.00
  323.                 fade
  324.                 offsetalongaxis random 4 0 0
  325.             )
  326.  
  327.             entry tagspawn tag_barrel
  328.             (
  329.                 count 1
  330.                 scale .7
  331.                 model models/fx/snipesmoke.tik
  332.             )
  333.         }
  334.     }
  335. }
  336.  
  337. /*QUAKED addon_playerweapon_british_lee-enfield (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  338. British rifle - Lee-Enfield.
  339. */
  340.  
  341.