Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //General weapon effects
- //flash is a 0.25 second event after a weapon is fired
- //fire is a single event when weapon is fired
- //impact is for weapons impact on something or explode like grenades
- //trail is a single event for weapons without projectiles or a constant event when projectile is in motion
- //projectile is for rendering the specific projectile
- //Bubbles in the water
- //input origin
- weapon/common/bubbles {
- shader waterbubble
- distance 5+rand*10 {
- size 1 + rand * 2
- random dir
- addScale origin dir origin 10 * rand
- emitter 1+rand*0.25 {
- alphaFade 0
- origin2 origin2 + lerp * 8
- Sprite
- }
- }
- }
- weapon/rocket/flash {
- color 1 0.75 0
- size 300 + rand*32
- light
- }
- weapon/rocket/projectile {
- //Render the rocket
- model "models/ammo/rocket/rocket.md3"
- dirModel
- //Sound generated by the flying rocket
- loopSound "sound/weapons/rocket/rockfly.wav"
- }
- weapon/rocket/trail {
- //The rocket's world light
- color 1 0.75 0
- size 200
- Light
- //The standard smoke puff trail thing
- color 0 0 0
- alpha 0.50
- shader smokePuff
- rotate 360 * rand
- distance 45 {
- emitter 2 {
- alphaFade 0
- size 8 + lerp * 15
- sprite cullNear
- }
- }
- color 1 0.15 0
- alpha 0.50
- shader flareShader
- interval 0.0010 {
- normalize parentVelocity v0
- inverse v0
- wobble v0 velocity 5 + rand*10
- scale velocity velocity 75 + rand*50
- emitter 0.1 + rand*0.55 {
- size 7 * ( 1 - 0.5 * lerp * 1.5 )
- colorFade 0.001
- moveGravity 0
- Sprite
- }
- }
- // color 1 0.75 0
- // alpha 0.005
- // shader flareShader
- // interval 0.001 {
- // random velocity
- // scale velocity velocity 10 + rand*20
- // size 4
- // emitter 0.050 {
- // colorFade 0.1
- // Sprite
- // }
- // }
- }
- weapon/rocket/impact {
- vibrate 70
- sound sound/weapons/rocket/rocklx1a.wav
- //Mark on the wall, using direction from parent
- shader gfx/damage/burn_med_mrk
- size 64
- Decal
- // Animating sprite of the explosion
- shader rocketExplosion
- size 40
- //Will be the light colour
- color 1 0.75 0
- emitter 1 {
- Sprite
- //size will goto zero after 0.5 of the time
- size 300 * clip(2 - 2*lerp)
- Light
- }
- // Fast Moving Particles
- color 1 0.75 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter "0.3 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- color 1 0.50 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter "0.3 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- color 1 0.2 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter "0.3 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- }
- weapon/bfg/flash {
- color 0.2 0.2 1
- size 300 + rand*32
- light
- }
- weapon/bfg/projectile {
- //ze model
- model models/weaphits/bfg.md3
- dirModel
- //ze flight sound
- loopSound "sound/weapons/rocket/rockfly.wav"
- }
- weapon/bfg/trail {
- // World Light
- color 0.2 0.2 1
- size 200
- Light
- color 0.2 0.2 1
- alpha 0.50
- shader flareShader
- distance 1 {
- normalize parentVelocity v0
- inverse v0
- wobble v0 velocity 5 + rand*10
- scale velocity velocity 75 + rand*52
- emitter 0.01 + rand*0.55 {
- size 10 * ( 1 - 0.5 * lerp * 1.5 )
- colorFade 0.001
- moveGravity 10
- Sprite
- }
- }
- color 0.7 0.7 1
- alpha 0.50
- shader flareShader
- interval 0.01 {
- normalize parentVelocity v0
- inverse v0
- wobble v0 velocity 10 + rand*10
- scale velocity velocity 75 + rand*50
- emitter 0.01 + rand*0.55 {
- size 0.1 * ( 1 + 40 * lerp * 1.5 )
- colorFade 0.001
- moveGravity 10
- Sprite
- }
- }
- }
- weapon/bfg/impact {
- vibrate 100
- sound sound/weapons/rocket/rocklx1a.wav
- //Mark on the wall
- shader gfx/damage/burn_med_mrk
- size 32
- decal
- // Impact Disc
- rotate rand*360
- shader railExplosion
- model models/weaphits/ring02.md3
- size 1.6
- emitter 0.6 {
- dirModel
- }
- //Plasma style impact mark
- color 0.2 0.2 1
- size 24
- shader gfx/damage/plasma_mrk
- Decal energy
- // Animating sprite of the explosion
- shader bfgExplosionNPM
- size 45
- color 0.2 0.2 1
- emitter 1 {
- Sprite
- size 300 * clip(2 - 2*lerp)
- Light
- }
- // Sparks
- color 0.2 0.2 1
- alpha 0.33
- shader flareShader
- repeat 40 {
- random velocity
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter "0.3 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- color 0.7 0.7 1
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter "0.3 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- }
- weapon/grenade/flash {
- color 1 0.7 0
- size 300 + rand*32
- light
- }
- weapon/grenade/projectile {
- //Render the grenade model
- model "models/ammo/grenadecpma.md3"
- anglesModel
- }
- weapon/grenade/trail {
- //The standard smoke puff trail thing
- //alpha 0.33
- //shader smokePuff
- //angle 360 * rand
- //Emit a sprite every 50 milliseconds
- //interval 0.05 {
- //emitter 0.700 {
- //alphaFade 0
- //size 8 + lerp * 15
- //sprite cullNear
- //}
- //}
- color 1 0.6 0.3
- alpha 0.33
- shader flareShader
- interval 0.001 {
- wobble dir velocity 0
- scale velocity velocity 0
- size 4
- emitter 0.35 {
- colorFade 0.001
- Sprite
- }
- }
- }
- weapon/grenade/impact {
- vibrate 70
- sound sound/weapons/rocket/rocklx1a.wav
- //Mark on the wall, using direction from parent
- shader gfx/damage/burn_med_mrk
- size 64
- Decal
- // Animating sprite of the explosion
- shader rocketExplosion
- size 40
- //Will be the light colour
- color 1 0.75 0
- emitter 1 {
- Sprite
- //size will goto zero after 0.5 of the time
- size 300 * clip(2 - 2*lerp)
- Light
- }
- color 1 0.75 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 175 + rand*50
- size 1 + rand*2
- emitter "0.4 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- color 1 0.50 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 175 + rand*50
- size 1 + rand*2
- emitter "0.4 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- color 1 0.2 0
- alpha 0.33
- shader flareShader
- repeat 20 {
- random velocity
- scale velocity velocity 175 + rand*50
- size 1 + rand*2
- emitter "0.4 + rand*0.3" {
- moveBounce 0 0.9
- colorFade 0.7
- Sprite
- }
- }
- }
- weapon/plasma/flash {
- color 0.6 0.6 1
- size 300 + rand*32
- light
- }
- weapon/plasma/projectile {
- //The sprite for the plasma
- size 14
- shader sprites/plasma1new
- sprite
- //Plasma flying sound
- loopSound "sound/weapons/plasma/lasfly.wav"
- }
- weapon/plasma/trail {
- color 0.6 0.6 1
- alpha 0.1
- shader railDisc
- interval 0.01 {
- normalize parentVelocity v0
- inverse v0
- wobble v0 velocity 100 + rand*50
- scale velocity velocity 10 + rand*50
- emitter 0.3 + rand*0.3 {
- size 10 * ( 1 - 0.5 * lerp * 1.5 )
- colorFade 0.001
- moveGravity 10
- sprite cullNear
- }
- }
- }
- weapon/plasma/impact {
- vibrate 10
- sound sound/weapons/plasma/plasmx1a.wav
- size 0.6
- shader plasmanewExplosion
- model models/weaphits/ring02.md3
- //Show the ring impact model on a random rotation around it's direction
- rotate rand*360
- emitter 0.6 {
- dirModel
- }
- size 14
- shader gfx/damage/plasma_mrk
- Decal energy
- shader flareShader
- alpha 0.8
- color 0.6 0.6 1
- repeat 2 {
- wobble dir velocity 10 + rand*30
- scale velocity velocity 200 + rand*50
- size 1.5 + rand*2
- emitter "1 + rand*0.3" {
- moveBounce 400 0.7
- colorFade 0.7
- Sprite
- }
- }
- }
- weapon/rail/flash {
- color 1 0.6 0
- size 300 + rand*32
- light
- }
- weapon/rail/impact {
- vibrate 50
- sound sound/weapons/plasma/plasmx1a.wav
- //The white expanding impact disc
- rotate rand*360
- shader railExplosion
- model models/weaphits/ring02.md3
- emitter 0.6 {
- dirModel
- }
- //Plasma style impact mark
- size 24
- shader gfx/damage/plasma_mrk
- Decal energy
- }
- weapon/rail/trail {
- //Color1 gets set before calling
- //The beam
- size r_railCoreWidth*0.5
- shader railCore
- emitter cg_railTrailTime * 0.001 {
- colorFade 0
- Beam
- }
- shader railDisc
- //color2 is stored in the parent input structure, retrieve it like this
- pushparent color2
- pop color
- if cg_oldrail {
- //Do the rail rings
- size r_railWidth*0.5
- //Rings take their stepsize from the width variable
- width r_railSegmentLength
- emitter cg_railTrailTime * 0.001 {
- colorFade 0.1
- Rings
- }
- // } else {
- //Do a spiral around the rail direction
- //Get length in t0
- t0 dir
- normalize dir
- //Create a perpendicular vector to the beam
- perpendicular dir v0
- //Radius around center
- scale v0 v0 4
- size 1.1
- //Set the rotate around angle to start value
- t1 rand*360
- //Go through length of beam in repeat steps
- repeat ( t0 / 5 ) {
- rotatearound v0 dir v1 t1
- //Slightly increase beyond regular 10 it so they don't all line up
- t1 t1 + 20
- addScale v1 dir origin loop * t0
- add parentOrigin origin origin
- emitter 0.8 {
- //5 radius + 6
- addScale origin v1 origin lerp * 0.8
- colorFade 0.7
- Sprite
- }
- }
- }
- }
- weapon/shotgun/flash {
- color 1 1 0
- size 300 + rand*32
- light
- }
- weapon/shotgun/impact {
- vibrate 1
- //Bullet mark on the wall, shotgun ones are smaller
- shader gfx/damage/bullet_mrk
- size 4
- Decal
- //explosion cone with animating shader
- size 1
- shader bulletExplosion
- model models/weaphits/bullet.md3
- rotate rand*360
- emitter 0.6 {
- dirModel
- }
- //a single sprite shooting up from impact surface
- wobble dir velocity 10 + rand*30
- scale velocity velocity 200 + rand*50
- size 1 + rand*0.5
- shader flareShader
- alpha 0.8
- color 1 0.6 0.3
- emitter 1 + rand*0.3 {
- moveBounce 400 0.7
- colorFade 0.6
- Sprite
- }
- }
- weapon/shotgun/trail {
- //Yep empty and not called
- }
- weapon/machinegun/impact {
- soundList {
- sound/weapons/machinegun/ric1.wav
- sound/weapons/machinegun/ric2.wav
- sound/weapons/machinegun/ric3.wav
- }
- //Bullet mark on the wall
- shader gfx/damage/bullet_mrk
- size 8
- decal
- //explosion cone with animating shader
- size 1
- shader bulletExplosion
- model "models/weaphits/bullet.md3"
- rotate rand*360
- emitter 0.6 {
- dirModel
- }
- //a single sprite shooting up from impact surface
- wobble dir velocity 10 + rand*30
- scale velocity velocity 200 + rand*50
- size 1.5 + rand
- shader flareShader
- alpha 0.8
- color 1 0.75 0.3
- emitter "1 + rand*0.3" {
- moveBounce 400 0.7
- colorFade 0.6
- Sprite
- }
- }
- weapon/machinegun/trail {
- }
- weapon/lightning/flash {
- color 0.6 0.6 1
- size 300 + rand*32
- light
- }
- //Input origin, dir
- weapon/lightning/trail {
- shader "lightningBoltNew"
- //Standard q3 beam size
- size 16
- //The beam is repeated every 45 degrees
- angle 45
- //Draw the beam between origin in direction of
- beam
- //Length of beam in t0
- t0 dir
- //Check if we need to render the impact flash effect thing
- //That means we end before the maximum lightning range
- if ( t0 < 768 ) {
- //Clear the previous shader so it uses the one in the model
- shaderClear
- model "models/weaphits/crackle.md3"
- size 1
- //Slightly before the endpoint
- addScale origin dir origin ( (t0 - 16 ) / t0 )
- //Just a random model in it's angles
- angles0 rand * 360
- angles1 rand * 360
- angles2 rand * 360
- anglesModel
- }
- }
- weapon/lightning/impact {
- vibrate 5
- //random impact sound
- soundList {
- sound/weapons/lightning/lg_hit.wav
- sound/weapons/lightning/lg_hit2.wav
- sound/weapons/lightning/lg_hit3.wav
- }
- //White Sparks
- shader flareShader
- alpha 0.8
- color 0.9 0.9 0.9
- repeat 2 {
- wobble dir velocity 10 + rand*20
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter 1 + rand*0.3 {
- colorFade 0.7
- Sprite
- moveBounce 400 0.7
- }
- }
- //Blueish Sparks
- shader flareShader
- alpha 0.8
- color 0.7 0.7 1
- repeat 2 {
- wobble dir velocity 10 + rand*20
- scale velocity velocity 200 + rand*50
- size 1 + rand*2
- emitter 1 + rand*0.3 {
- colorFade 0.7
- Sprite
- moveBounce 400 0.7
- }
- }
- //Hole mark shader decal
- shader gfx/damage/hole_lg_mrk
- size 12
- decal
- }
- weapon/gauntlet/flash {
- color 0.6 0.6 1
- size 300 + rand*32
- light
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement