Guest User

Untitled

a guest
Jan 30th, 2015
247
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. weapon/rocket/impact
  2. {
  3. ////////////////////////////////////////////////////////////////////// MARK
  4.  
  5. vibrate 70
  6. sound sound/weapons/rocket/rocklx1a.wav
  7.  
  8. shader gfx/damage/burn_med_mrk
  9. size 50 //64
  10. Decal
  11.  
  12. ////////////////////////////////////////////////////////////////////// OLD STYLE EXPLOSION - SIZE=100
  13. shader rocketExplosion
  14. size 40
  15. //Will be the light colour
  16. color 1 0.75 0
  17. emitter 1 {
  18. Sprite
  19. //size will goto zero after 0.5 of the time
  20. size 10 * clip(2 - 2*lerp)
  21. //Light
  22. }
  23.  
  24.  
  25. ////////////////////////////////////////////////////////////////////// LIGHT
  26.  
  27. color 1 0.5 0.1
  28. emitter 1
  29. {
  30. Sprite
  31. size 200 * clip(2 - 2*lerp)
  32. Light
  33. }
  34.  
  35. ////////////////////////////////////////////////////////////////////// 3x SPARK
  36.  
  37. shader flareShader
  38. alpha 1
  39.  
  40. color 1 0.5 0.1 //orange
  41. width 5
  42. repeat 4 + 10*rand {
  43. wobble dir velocity 100 + rand*20
  44. scale velocity velocity 200 + rand*50
  45. size 0*rand*rand
  46. emitter "0.6 * rand" {
  47. moveGravity 100
  48. colorFade 0.9
  49. spark
  50. }
  51. }
  52.  
  53.  
  54. color 1 0.1 0.1 //red
  55. width 5
  56. repeat 2 + 7*rand {
  57. wobble dir velocity 100 + rand*20
  58. scale velocity velocity 200 + rand*50
  59. size 0*rand*rand
  60. emitter "0.5 * rand" {
  61. moveGravity 100
  62. colorFade 0.9
  63. spark
  64. }
  65. }
  66.  
  67. color 0 0.3 0.6 //blue
  68. width 5
  69. repeat 1 + 3*rand {
  70. wobble dir velocity 100 + rand*20
  71. scale velocity velocity 200 + rand*50
  72. size 0*rand*rand
  73. emitter "0.5 * rand" {
  74. moveGravity 0
  75. colorFade 0.9
  76. spark
  77. }
  78. }
  79.  
  80. ////////////////////////////////////////////////////////////////////// STILL EXPLOSION
  81.  
  82. color 1 0.5 0.1
  83.  
  84. repeat 5{
  85. wobble dir velocity 0 + rand*20
  86. scale velocity velocity 0 + rand*50
  87. size 45 + 30*rand
  88. emitter "0.6 + rand*0.4" {
  89. colorFade 0.05
  90. sprite
  91. }
  92. }
  93.  
  94. ////////////////////////////////////////////////////////////////////// FLYING PARTICLES
  95.  
  96. repeat 100 + rand*50 {
  97. wobble dir velocity 10 + rand*20
  98. scale velocity velocity 200 + rand*50
  99. size 0.4 + rand*3
  100. emitter "0.1 + rand*0.4" {
  101. moveBounce 80 0.1
  102. colorFade 0.7
  103. sprite
  104. }
  105. }
  106.  
  107. repeat 100 + rand*40{
  108. wobble dir velocity 40 + rand*20
  109. scale velocity velocity 200 + rand*50
  110. size 0.5 + rand*2
  111. emitter "0.1 + rand*0.4" {
  112. moveBounce 80 0.1
  113. colorFade 0.7
  114. sprite
  115. }
  116. }
  117.  
  118. width 1
  119. repeat 100 + rand*60 {
  120. wobble dir velocity rand*70
  121. scale velocity velocity 200 + rand*50
  122. size 0.5 + rand*1
  123. emitter "0.1 + rand*0.4" {
  124. moveBounce 80 0.1
  125. colorFade 0.9
  126. spark
  127. }
  128. }
  129.  
  130. }
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. weapon/rocket/trail {
  141. color 1 0.75 0
  142.  
  143. size 200
  144. Light
  145.  
  146. color 0 0 0
  147. alpha 0.9
  148. shader smokePuff
  149. rotate 360 * rand
  150. distance 35 {
  151. emitter 1.7 {
  152. alphaFade 0
  153. size 0 + lerp * 15
  154. sprite cullNear
  155. }
  156. }
  157.  
  158. color 1 0.4 0.1
  159. alpha 0.50
  160. shader flareShader
  161. interval 0.001 {
  162. normalize parentVelocity v0
  163. inverse v0
  164. wobble v0 velocity 5 + rand*10
  165. scale velocity velocity 75 + rand*20
  166. emitter 0.05 + rand*0.1 {
  167. size 0 * ( 1 - 0.4 * lerp * 0.7 )
  168. colorFade 0.001
  169. moveGravity 0
  170. Sprite
  171. }
  172. }
  173. }
  174.  
  175.  
  176.  
  177. //GRENADE
  178.  
  179. weapon/grenade/flash {
  180. color 1 4 2 ///defcolor1 4 2
  181.  
  182. size 10
  183. light
  184. }
  185.  
  186.  
  187.  
  188. weapon/grenade/projectile {
  189. // Render the grenade model
  190. model "models/ammo/grenade1.md3"
  191.  
  192. // wolfcam need to do model rotation yourself
  193. if velocity {
  194. rotate time * 1000 / 4
  195. }
  196.  
  197. anglesModel
  198.  
  199.  
  200. //////////////////////////
  201. shader flareshader
  202.  
  203. distance 1 // t9
  204. {
  205. wobble dir velocity 0
  206. scale velocity velocity 0
  207. size 2.5 //
  208.  
  209. emitter 0.5 + rand *0.25 { // lgls: isn't trail too long?
  210. colorFade 0
  211. color .5 .25 0 ///defcolor .5 .25 0
  212. Sprite
  213. }
  214. }
  215. }
  216.  
  217.  
  218. weapon/grenade/trail { // lgls: are you really wanna add smoke to trail? Looks like shit :>
  219. // The standard SMOKE PUFF
  220. alpha 0.25
  221. shader smokePuff
  222. angle 360 * rand
  223. // Emit a sprite every 50 milliseconds
  224. interval 0.025 {
  225. emitter 0.700 {
  226. alphaFade 0
  227. size 0 + lerp * 32
  228. sprite cullNear
  229. }
  230. }
  231. }
  232.  
  233.  
  234. weapon/grenade/impact { ////////////////////////////////////////////////////////////////////// MARK
  235.  
  236. vibrate 70
  237. sound sound/weapons/rocket/rocklx1a.wav
  238.  
  239. shader gfx/damage/burn_med_mrk
  240. size 50 //64
  241. Decal
  242.  
  243. ////////////////////////////////////////////////////////////////////// OLD STYLE EXPLOSION - SIZE=100
  244. shader rocketExplosion
  245. size 0
  246. //Will be the light colour
  247. color 1 0.75 0
  248. emitter 1 {
  249. Sprite
  250. //size will goto zero after 0.5 of the time
  251. size 25 * clip(2 - 2*lerp)
  252. //Light
  253. }
  254.  
  255.  
  256. ////////////////////////////////////////////////////////////////////// LIGHT
  257.  
  258. color 1 0.5 0.1
  259. emitter 1
  260. {
  261. Sprite
  262. size 300 * clip(2 - 2*lerp)
  263. Light
  264. }
  265. }
  266.  
  267. }
  268.  
  269.  
  270.  
  271.  
  272. //PLASMA
  273.  
  274. weapon/plasma/flash
  275. {
  276. color 0.6 0.6 1
  277. size 300 + rand*32
  278. light
  279. }
  280.  
  281. weapon/plasma/projectile
  282. {
  283. //The sprite for the plasma
  284. color 0 0.3 0.6
  285. size 18
  286. Light
  287. shader flareshader
  288. sprite
  289.  
  290.  
  291. size 14
  292. shader sprites/plasma1
  293. sprite
  294. //Plasma flying sound
  295. loopSound "sound/weapons/plasma/lasfly.wav"
  296. }
  297.  
  298. weapon/plasma/trail
  299. {
  300. width 1
  301. shader flareShader
  302. alpha 0.8
  303. color 0 0.3 0.6
  304. distance 3*rand
  305. {
  306. random dir
  307. wobble dir velocity 50 + rand*70
  308. scale velocity velocity 100 + rand*100
  309. size 50*rand
  310. emitter "0.1 * rand * rand" {
  311. //moveGravity 150
  312. colorFade 0.4
  313. spark cullNear
  314. }
  315. }
  316. shader flareShader
  317. alpha 0.8
  318. distance 3*rand
  319. {
  320. wobble dir velocity 50 + rand*70
  321. scale velocity velocity 100 + rand*100
  322. size 5*rand
  323. emitter "0.1 * rand * rand" {
  324. //moveGravity 150
  325. colorFade 0.4
  326. sprite cullNear
  327. }
  328. }
  329. shader flareShader
  330. alpha 0.8
  331. distance 3*rand
  332. {
  333. wobble dir velocity 50 + rand*70
  334. scale velocity velocity 100 + rand*100
  335. size 5*rand
  336. emitter "0.1 * rand * rand" {
  337. //moveGravity 150
  338. colorFade 0.4
  339. quad cullNear
  340. }
  341. }
  342.  
  343. }
  344.  
  345. weapon/plasma/impact {
  346. vibrate 10
  347. sound sound/weapons/plasma/plasmx1a.wav
  348.  
  349. shader plasmaExplosion
  350. model models/weaphits/ring02.md3
  351.  
  352. //Show the ring impact model on a random rotation around it's direction
  353.  
  354. rotate rand*360
  355. emitter 0.6 {
  356. dirModel
  357. }
  358. size 24
  359. shader gfx/damage/plasma_mrk
  360. Decal energy
  361.  
  362. width 1
  363. shader flareShader
  364. alpha 1
  365. color 0 0.3 0.6
  366. repeat 20 + 20*rand {
  367. random dir
  368. wobble dir velocity 100 + rand*20
  369. scale velocity velocity 200 + rand*50
  370. size 80*rand
  371. emitter "0.5 * rand" {
  372. //moveGravity 100
  373. colorFade 0.9
  374. spark
  375. }
  376. }
  377.  
  378. alpha 1
  379. color 0 0.2 1
  380. repeat 10 + rand*10 {
  381. wobble dir velocity 10 + rand*20
  382. scale velocity velocity 200 + rand*50
  383. size 1 + rand*2 //size 2 + rand
  384. emitter "1 + rand*0.5" {
  385. moveBounce 450 0.6 //300
  386. colorFade 0.7
  387. sprite
  388. }
  389. }
  390.  
  391. color 0 0.2 1
  392. emitter 0.6
  393. {
  394. Sprite
  395. size 100 * clip(2 - 2*lerp)
  396. Light
  397. }
  398. }
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405. ////////////////////////////////////////////////////////////////////// LIGHT
  406.  
  407. color 1 0.5 0.1
  408. emitter 1
  409. {
  410. Sprite
  411. size 200 * clip(2 - 2*lerp)
  412. Light
  413. }
  414.  
  415. ////////////////////////////////////////////////////////////////////// 3x SPARK
  416.  
  417. shader flareShader
  418. alpha 1
  419.  
  420. color 1 0.5 0.1 //orange
  421. width 5
  422. repeat 4 + 10*rand {
  423. wobble dir velocity 100 + rand*20
  424. scale velocity velocity 200 + rand*50
  425. size 500*rand*rand
  426. emitter "0.6 * rand" {
  427. moveGravity 100
  428. colorFade 0.9
  429. spark
  430. }
  431. }
  432.  
  433.  
  434. color 1 0.1 0.1 //red
  435. width 5
  436. repeat 2 + 7*rand {
  437. wobble dir velocity 100 + rand*20
  438. scale velocity velocity 200 + rand*50
  439. size 400*rand*rand
  440. emitter "0.5 * rand" {
  441. moveGravity 100
  442. colorFade 0.9
  443. spark
  444. }
  445. }
  446.  
  447. color 0 0.3 0.6 //blue
  448. width 5
  449. repeat 1 + 3*rand {
  450. wobble dir velocity 100 + rand*20
  451. scale velocity velocity 200 + rand*50
  452. size 250*rand*rand
  453. emitter "0.5 * rand" {
  454. moveGravity 100
  455. colorFade 0.9
  456. spark
  457. }
  458. }
  459.  
  460. ////////////////////////////////////////////////////////////////////// STILL EXPLOSION
  461.  
  462. color 1 0.5 0.1
  463.  
  464. repeat 3{
  465. wobble dir velocity 10 + rand*20
  466. scale velocity velocity 10 + rand*50
  467. size 50 + 30*rand
  468. emitter "0.6 + rand*0.4" {
  469. colorFade 0.7
  470. sprite
  471. }
  472. }
  473.  
  474. ////////////////////////////////////////////////////////////////////// FLYING PARTICLES
  475.  
  476. repeat 2 + rand*5 {
  477. wobble dir velocity 10 + rand*20
  478. scale velocity velocity 200 + rand*50
  479. size 10 + rand*10
  480. emitter "0.6*rand + rand*0.6" {
  481. moveBounce 80 0.8
  482. colorFade 0.7
  483. sprite
  484. }
  485. }
  486.  
  487. repeat 40 + rand*40{
  488. wobble dir velocity 40 + rand*20
  489. scale velocity velocity 200 + rand*50
  490. size 1 + rand*2
  491. emitter "3*rand + rand" {
  492. moveBounce 250 0.8
  493. colorFade 0.7
  494. sprite
  495. }
  496. }
  497.  
  498. width 1
  499. repeat 50 + rand*60 {
  500. wobble dir velocity rand*70
  501. scale velocity velocity 200 + rand*50
  502. size 10 + rand*2
  503. emitter "0.75 + rand*0.4" {
  504. moveBounce 150 0.8
  505. colorFade 0.9
  506. spark
  507. }
  508. }
  509.  
  510. }
  511. //ROCKET
  512.  
  513. weapon/rocket/flash {
  514. color 1 0.75 0
  515. size 300 + rand*32
  516. light
  517. }
  518.  
  519. weapon/rocket/projectile {
  520. //Render the rocket
  521. model "models/ammo/rocket/rocket.md3"
  522. dirModel
  523.  
  524. //Sound generated by the flying rocket
  525. loopSound "sound/weapons/rocket/rockfly.wav"
  526. }
  527. }
  528.  
  529. }
  530.  
  531. //LIGHTING
  532.  
  533. weapon/lightning/flash {
  534. color 0.6 0.6 1
  535. size 300 + rand*32
  536. light
  537. }
  538.  
  539.  
  540. //Input origin, dir
  541. weapon/lightning/trail {
  542. shader "lightningBoltNew"
  543. //Standard q3 beam size
  544. size 16
  545. //The beam is repeated every 45 degrees
  546. angle 45
  547. //Draw the beam between origin in direction of
  548. beam
  549. //Length of beam in t0
  550. t0 dir
  551. //Check if we need to render the impact flash effect thing
  552. //That means we end before the maximum lightning range
  553. if ( t0 < 768 ) {
  554. //Clear the previous shader so it uses the one in the model
  555. shaderClear
  556. model "models/weaphits/crackle.md3"
  557. size 1
  558. //Slightly before the endpoint
  559. addScale origin dir origin ( (t0 - 16 ) / t0 )
  560. //Just a random model in it's angles
  561. angles0 rand * 360
  562. angles1 rand * 360
  563. angles2 rand * 360
  564. anglesModel
  565. }
  566. }
  567.  
  568.  
  569. //RAIL
  570.  
  571. weapon/rail/flash {
  572. color 1 0.6 0
  573. size 300 + rand*32
  574. light
  575. }
  576.  
  577.  
  578.  
  579. weapon/rail/trail {
  580. if(enemy) {
  581. pushparent color2
  582. pop color
  583. }
  584.  
  585. size r_railCoreWidth*2
  586. shader RailCore
  587. emitter cg_railTrailTime * 0.002 {
  588. colorFade 0
  589. Beam
  590. }
  591.  
  592. alpha 0.5
  593. color 1 1 1
  594. size r_railCoreWidth* 0.2
  595. shader kopherCore
  596. emitter cg_railTrailTime * 0.002 {
  597. colorFade 0
  598. Beam
  599. }
  600.  
  601. pushparent color2
  602. pop color
  603. shader railDisc
  604.  
  605. t0 dir
  606. normalize dir
  607. perpendicular dir v0
  608. scale v0 v0 4
  609. size 0.5
  610.  
  611. t1 rand*360
  612.  
  613. repeat ( t0 / 5 ) {
  614. rotatearound v0 dir v1 t1
  615. t1 t1 + 10
  616. addScale v1 dir origin loop * t0
  617. add parentOrigin origin origin
  618. emitter 0.9+loop {
  619. addScale origin v1 origin lerp * 0.1
  620. colorFade 0.7
  621. Sprite
  622. }
  623. }
  624. }
  625. }
RAW Paste Data