From 992111ed0e8af507027a6c119fd3060be915e29b Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 22 Jan 2008 21:20:14 +0000 Subject: [PATCH] changed all te_ effects (except te_bloodshower) to pointparticles() calls (or trailparticles in one case) reworked all effects and named them properly restored nexuiz 2.3 effects so old demos will play exactly as they used to (except for trail effects which are upgraded) tweaked W_SetupShot calls, w_shotorg is now trustworthy and muzzleflashes appear in the correct location git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3227 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/effectinfo.txt | 1293 +++++++++++++++++------- data/qcsrc/server/arena.qc | 1 - data/qcsrc/server/cl_player.qc | 4 +- data/qcsrc/server/cl_weapons.qc | 3 - data/qcsrc/server/cl_weaponsystem.qc | 4 +- data/qcsrc/server/defs.qh | 1 - data/qcsrc/server/g_damage.qc | 80 -- data/qcsrc/server/g_decors.qc | 31 - data/qcsrc/server/g_hook.qc | 3 +- data/qcsrc/server/g_violence.qc | 2 +- data/qcsrc/server/t_items.qc | 14 +- data/qcsrc/server/t_jumppads.qc | 15 +- data/qcsrc/server/t_teleporters.qc | 4 +- data/qcsrc/server/w_common.qc | 35 +- data/qcsrc/server/w_crylink.qc | 62 +- data/qcsrc/server/w_electro.qc | 28 +- data/qcsrc/server/w_grenadelauncher.qc | 20 +- data/qcsrc/server/w_hagar.qc | 17 +- data/qcsrc/server/w_laser.qc | 9 +- data/qcsrc/server/w_nex.qc | 27 +- data/qcsrc/server/w_rocketlauncher.qc | 14 +- data/qcsrc/server/w_shotgun.qc | 16 +- data/qcsrc/server/w_uzi.qc | 7 +- 23 files changed, 989 insertions(+), 701 deletions(-) diff --git a/data/effectinfo.txt b/data/effectinfo.txt index fbac5efa0..079cec9e1 100644 --- a/data/effectinfo.txt +++ b/data/effectinfo.txt @@ -17,9 +17,9 @@ type static color 0x63F2EA 0x63f2EA size 20 20 alpha 128 128 128 -lightradius 100 -lightradiusfade 100 -lightcolor 1 2 2 +lightradius 200 +lightradiusfade 200 +lightcolor 0.4 0.9 0.9 // cloud of particles which expand rapidly and then slow to form a ball effect TE_WIZSPIKE count 100 @@ -53,8 +53,8 @@ size 24 24 alpha 256 256 0 originjitter 16 16 16 lightradius 200 -lightradiusfade 500 -lightcolor 8 0.4 0.4 +lightradiusfade 1000 +lightcolor 4 0.2 0.2 // flare effect effect TE_KNIGHTSPIKE countabsolute 1 @@ -75,19 +75,6 @@ airfriction 6 liquidfriction 6 //originjitter 32 32 32 velocityjitter 256 256 256 -effect TE_KNIGHTSPIKE -count 14 -type smoke -tex 48 55 -color 0x800000 0xFF8020 -size 12 12 -alpha 0 256 100 -originjitter 1 1 1 -airfriction 5 -liquidfriction 16 -velocityjitter 23 23 183 -sizeincrease 6 -gravity -0.04 // machinegun bullet impact // bullet impact decal @@ -98,100 +85,39 @@ tex 56 59 size 5 5 alpha 256 256 0 originjitter 6 6 6 -//lightradius 30 -//lightradiusfade 90 -//lightcolor 1 1 1 // dust/smoke drifting away from the impact effect TE_SPIKE -count 5 +count 8 type smoke -tex 48 55 +tex 0 8 color 0x101010 0x101010 -size 7 7 -alpha 0 256 100 -originjitter 1 1 1 -airfriction 5 -liquidfriction 16 -velocityjitter 183 183 183 -sizeincrease 7 -gravity -0.04 +size 3 3 +sizeincrease 3 +alpha 255 255 256 +originjitter 0 0 0 +velocityjitter 8 8 8 // dust/smoke staying at the impact effect TE_SPIKE -count 5 +count 1 type smoke -tex 48 55 +tex 0 8 color 0x505050 0x505050 -size 7 7 -alpha 0 256 100 -originjitter 1 1 1 -airfriction 3 -liquidfriction 16 -velocityjitter 85 85 85 -sizeincrease 7 -gravity -0.04 - +size 4 4 +sizeincrease 4 +alpha 255 255 128 +originjitter 0 0 0 +velocityjitter 0 0 0 // bouncing sparks effect TE_SPIKE -count 12 -tex 40 40 +count 20 type spark color 0x8f4333 0xfff31b size 0.4 0.4 -alpha 0 256 7256 -gravity 0.6 +alpha 0 256 256 +gravity 1 bounce 1.5 -airfriction 3 velocityoffset 0 0 80 -velocityjitter 124 124 124 - -/* -effect TE_SPIKE -count 3 -type spark -tex 40 40 -color 0xFDFFD9 0xFDFFD9 -size 2 2 -alpha 511 512 644 -//gravity 1 -gravity 0 -airfriction 16 -bounce 1 - -velocityoffset 0 0 45 -originjitter 1 1 1 -velocityjitter 777 777 777 -velocitymultiplier 65 -*/ - -effect TE_SPIKE -count 2 -type spark -tex 40 40 -color 0xFDFFD9 0xFDFFD9 -size 6 4 -alpha 444 512 866 -gravity 1 -bounce 1 -airfriction 2 -velocityoffset 0 0 15 -originjitter 1 1 1 -velocityjitter 153 153 153 -velocitymultiplier 65 - -effect TE_SPIKE -count 14 -type spark -tex 40 40 -color 0xFDFFD9 0xFDFFD9 -size 4 4 -alpha 444 512 866 -gravity 1 -bounce 1 -velocityoffset 0 0 15 -airfriction 5 -originjitter 1 1 1 -velocityjitter 888 888 888 - +velocityjitter 64 64 64 // electro combo explosion // decal @@ -203,8 +129,8 @@ size 64 64 alpha 256 256 0 originjitter 34 34 34 lightradius 400 -lightradiusfade 300 -lightcolor 4 5 6 +lightradiusfade 200 +lightcolor 2 2.5 3 // flare effect effect TE_SPIKEQUAD countabsolute 1 @@ -212,7 +138,7 @@ type static tex 38 38 color 0x80C0FF 0x80C0FF size 48 48 -alpha 128 128 64 +alpha 256 256 128 // large sparks effect TE_SPIKEQUAD count 20 @@ -226,19 +152,6 @@ airfriction 4 liquidfriction 16 //velocityoffset 0 0 120 velocityjitter 512 512 512 -effect TE_SPIKEQUAD -count 32 -type spark -tex 41 41 -color 0xFDFFD9 0xFDFFD9 -size 16 16 -alpha 444 512 866 -gravity 1 -bounce 1 -velocityoffset 0 0 15 -airfriction 9 -originjitter 1 1 1 -velocityjitter 1333 1333 1333 /* // inner cloud of smoke effect TE_SPIKEQUAD @@ -350,21 +263,17 @@ tex 56 59 size 3 3 alpha 256 256 0 originjitter 6 6 6 -//lightradius 30 -//lightradiusfade 90 -//lightcolor 1 1 1 // dust/smoke drifting away from the impact effect TE_GUNSHOT count 4 type smoke tex 0 8 color 0x101010 0x101010 -size 4 4 -sizeincrease 10 +size 3 3 +sizeincrease 3 alpha 128 128 64 originjitter 0 0 0 -airfriction 8 -velocityjitter 30 30 30 +velocityjitter 8 8 8 // dust/smoke staying at the impact effect TE_GUNSHOT count 1 @@ -388,21 +297,6 @@ bounce 1.5 velocityoffset 0 0 80 velocityjitter 64 64 64 -effect TE_GUNSHOT -count 6 -type spark -tex 40 40 -color 0xFDFFD9 0xFDFFD9 -size 3 2 -alpha 444 512 866 -gravity 1 -bounce 1 -velocityoffset 0 0 5 -airfriction 5 -originjitter 1 1 1 -velocityjitter 500 500 500 - - /* // quake effect // decal @@ -460,9 +354,9 @@ tex 47 47 size 8 8 alpha 256 256 0 originjitter 12 12 12 -//lightradius 30 -//lightradiusfade 60 -//lightcolor 1.6 0.2 2 +//lightradius 100 +//lightradiusfade 300 +//lightcolor 0.5 0.5 0.5 // purple flare effect effect TE_GUNSHOTQUAD countabsolute 1 @@ -492,9 +386,9 @@ tex 8 16 size 48 48 alpha 256 256 0 originjitter 40 40 40 -lightradius 250 -lightradiusfade 400 -lightcolor 8 4 1 +lightradius 350 +lightradiusfade 700 +lightcolor 4 2 0.5 // flare effect effect TE_EXPLOSION countabsolute 1 @@ -726,9 +620,9 @@ tex 47 47 size 24 24 alpha 256 256 0 originjitter 16 16 16 -lightradius 100 -lightradiusfade 300 -lightcolor 4 6 8 +lightradius 200 +lightradiusfade 400 +lightcolor 1 1 1 // flare effect effect TE_PLASMABURN countabsolute 1 @@ -814,36 +708,19 @@ countabsolute 1 type beam tex 60 60 color 0xFFFFFF 0xFFFFFF -size 6 6 -alpha 128 128 192 - -// The RING smoke -// experimental -effect TE_TEI_G3 -trailspacing 12 -color 0x0B3E4F 0x0B3E4F size 4 4 -tex 32 32 -alpha 0 256 200 -airfriction 5 -//liquidfriction -4 -sizeincrease 18 -//velocityjitter 4 4 -type static - -// The drifting smoke to accompany it +alpha 128 128 256 // experimental effect TE_TEI_G3 -trailspacing 8 -color 0x0B3E4F 0x0B3E4F -size 4 4 -tex 48 55 -alpha 0 256 200 -airfriction 5 -//liquidfriction -4 -sizeincrease 24 -//velocityjitter 125 125 125 +trailspacing 2 type static +color 0x202020 0x404040 +size 1 1 +alpha 256 256 512 +airfriction -4 +//liquidfriction -4 +velocityjitter 8 8 8 +type smoke /* // experimental effect TE_TEI_G3 @@ -883,9 +760,9 @@ tex 8 16 size 72 72 alpha 256 256 0 originjitter 40 40 40 -lightradius 400 -lightradiusfade 400 -lightcolor 8 4 1 +lightradius 500 +lightradiusfade 500 +lightcolor 4 2 0.5 // flare effect effect TE_TEI_BIGEXPLOSION countabsolute 1 @@ -946,9 +823,9 @@ tex 59 59 size 32 32 alpha 256 256 0 originjitter 20 20 20 -lightradius 250 -lightradiusfade 250 -lightcolor 3.125 4.375 10 +lightradius 200 +lightradiusfade 600 +lightcolor 2.4 4.8 8 // flare effect effect TE_TEI_PLASMAHIT countabsolute 1 @@ -981,88 +858,55 @@ originjitter 20 20 20 velocityjitter 32 32 32 */ -// rocket trail -// smoke -effect TR_ROCKET -trailspacing 6 -type smoke -color 0x303030 0x606060 -tex 0 8 -size 7 7 -alpha 32 32 32 -lightradius 150 -lighttime 0 -lightcolor 6 3 1 -// fire -effect TR_ROCKET -notunderwater -trailspacing 6 -type static -color 0x805010 0xFFA020 -tex 0 8 -size 6 6 -alpha 144 144 288 -airfriction 8 -velocityjitter 32 32 32 -velocitymultiplier -0.5 -// bubbles -effect TR_ROCKET -underwater -trailspacing 8 -type bubble -tex 62 62 -color 0x404040 0x808080 -size 1 1 -alpha 256 256 256 -gravity -0.125 -bounce 1.5 -liquidfriction 4 -velocityjitter 16 16 16 -// sparks -effect TR_ROCKET -trailspacing 10 -type spark -tex 40 40 -color 0xFFFDD9 0xFFFDD9 -size 2 2 -alpha 444 512 1866 -gravity 1 -bounce 1 -velocityoffset 0 0 15 -airfriction 12 -originjitter 1 1 1 -velocityjitter 200 200 200 -velocitymultiplier -0.5 -// grenade trail -// smoke -effect TR_GRENADE -notunderwater -trailspacing 3 -type smoke -color 0x303030 0x606060 -tex 0 8 -size 3 3 -alpha 64 64 64 -// bubbles -effect TR_GRENADE -underwater -trailspacing 16 -type bubble -tex 62 62 -color 0x404040 0x808080 -size 1 1 -alpha 256 256 256 -gravity -0.125 -bounce 1.5 -liquidfriction 4 -velocityjitter 16 16 16 -// normal super gorey blood trail (used by gibs) -effect TR_BLOOD -trailspacing 16 + + + + + + +////////////////////////////////////////////////// +// New effects in 2.4 +////////////////////////////////////////////////// + + + +// bloody impact effect indicating damage +effect blood +count 0.333 type blood -color 0xFFFFFF 0xFFFFFF +tex 24 32 +size 8 8 +alpha 256 256 64 +bounce -1 +airfriction 1 +liquidfriction 4 +velocityjitter 64 64 64 +velocitymultiplier 1 + + + +// player teleport effect +effect teleport +count 112 +type static +color 0xA0A0A0 0xFFFFFF +size 10 10 +alpha 64 128 256 +airfriction 1 +liquidfriction 4 +originoffset 0 0 28 +originjitter 16 16 28 +velocityjitter 0 0 256 + + + +// normal super gory blood trail (used by gibs) +effect TR_BLOOD +trailspacing 16 +type blood +color 0xFFFFFF 0xFFFFFF tex 24 32 size 8 8 alpha 384 384 192 @@ -1072,6 +916,8 @@ liquidfriction 4 velocityjitter 64 64 64 velocitymultiplier 0.5 + + // thinner blood trail (used by quake zombies) effect TR_SLIGHTBLOOD trailspacing 32 @@ -1086,78 +932,9 @@ liquidfriction 4 velocityjitter 64 64 64 velocitymultiplier 0.5 -// quake effect -effect TR_WIZSPIKE -trailspacing 3 -type alphastatic -color 0x372b17 0x73571f -size 2 2 -alpha 64 64 192 - -// quake effect -effect TR_KNIGHTSPIKE -trailspacing 3 -type alphastatic -color 0x5f0700 0xcf632b -size 2 2 -alpha 64 64 192 - -// quake effect -effect TR_VORESPIKE -trailspacing 3 -type alphastatic -color 0x502030 0x502030 -size 3 3 -alpha 64 64 96 -lightradius 200 -lighttime 0 -lightcolor 1.2 0.5 1.0 - -// electro trail -// smokey sparky thing -effect TR_NEXUIZPLASMA -trailspacing 4 -type static -color 0x283880 0x283880 -size 4 4 -alpha 256 256 768 -velocityjitter 16 16 16 -lightradius 90 -lighttime 0 -lightcolor 1.5 3 6 -velocitymultiplier -0.1 - -effect TR_NEXUIZPLASMA -trailspacing 6 -count 3 -type spark -tex 41 41 -color 0xFDFFD9 0xFDFFD9 -size 2 2 -alpha 444 512 1866 -gravity 1 -bounce 1 -velocityoffset 0 0 15 -airfriction 12 -originjitter 1 1 1 -velocityjitter 200 200 200 -// quake effect -effect EF_FLAME -count 300 -type smoke -color 0x6f0f00 0xe3974f -size 4 4 -alpha 64 128 384 -gravity -1 -airfriction 1 -liquidfriction 4 -velocityjitter 128 128 128 -lightradius 200 -lighttime 0 -lightcolor 2 1.5 0.5 -// quake effect +// func_stardust effect, used in some maps to indicate teleporters effect EF_STARDUST count 75 type static @@ -1173,6 +950,35 @@ velocityjitter 32 32 0 //lighttime 0 //lightcolor 0.4 0.9 0.9 + + +// flare particle and light +effect item_respawn +countabsolute 1 +type static +color 0x63F2EA 0x63f2EA +size 32 32 +alpha 128 128 128 +// cloud of particles which expand rapidly and then slow to form a ball +effect item_respawn +count 64 +type spark +tex 41 41 +color 0x63F2EA 0x63f2EA +size 2 2 +alpha 256 256 1280 +//originjitter 24 24 24 +velocityjitter 256 256 256 + + + +effect jumppad_activate +lightradius 200 +lightradiusfade 2000 +lightcolor 2 2 2 + + + effect laser_muzzleflash count 1 type smoke @@ -1188,6 +994,53 @@ lightradius 200 lightradiusfade 2000 lightcolor 3 0.1 0.1 + + +// decal +effect laser_impact +countabsolute 1 +type decal +tex 47 47 +size 24 24 +alpha 256 256 0 +originjitter 16 16 16 +lightradius 200 +lightradiusfade 500 +lightcolor 8 0.4 0.4 +// flare effect +effect laser_impact +countabsolute 1 +type static +tex 39 39 +color 0xFF2010 0xFF2010 +alpha 256 256 1024 +size 24 24 +// sparks that rapidly expand and rapidly slow down to form an interesting spherical effect +effect laser_impact +count 256 +type spark +color 0x800000 0xFF8020 +alpha 256 256 1024 +size 4 4 +//bounce 1.5 +airfriction 6 +liquidfriction 6 +//originjitter 32 32 32 +velocityjitter 256 256 256 +effect laser_impact +count 8 +type smoke +tex 48 55 +color 0x800000 0xFF8020 +size 12 12 +alpha 128 256 256 +originjitter 1 1 1 +velocitymultiplier 0.01 +velocityjitter 16 16 16 +sizeincrease 6 + + + effect shotgun_muzzleflash count 3 type smoke @@ -1213,6 +1066,60 @@ velocityjitter 200 200 200 velocitymultiplier 0.5 airfriction 12 + + +// shotgun pellet impact +// decal +effect shotgun_impact +countabsolute 1 +type decal +tex 56 59 +size 3 3 +alpha 256 256 0 +originjitter 6 6 6 +//lightradius 30 +//lightradiusfade 90 +//lightcolor 1 1 1 +// dust/smoke drifting away from the impact +effect shotgun_impact +count 5 +type smoke +tex 48 55 +color 0xFFFFFF 0xFFFFFF +size 7 7 +alpha 0 64 32 +originjitter 1 1 1 +airfriction 7 +liquidfriction 16 +velocityjitter 85 85 85 +sizeincrease 3 +// dust/smoke staying at the impact +effect shotgun_impact +count 1 +type smoke +tex 48 55 +color 0xFFFFFF 0xFFFFFF +size 7 7 +alpha 64 64 32 +sizeincrease 3 +// sparks +effect shotgun_impact +notunderwater +count 20 +type spark +tex 40 40 +color 0xFDFFD9 0xFDFFD9 +size 0.6 0.6 +alpha 256 256 768 +gravity 1 +bounce 1 +airfriction 5 +originjitter 1 1 1 +velocityjitter 400 400 400 +velocitymultiplier 0.1 + + + effect uzi_muzzleflash count 2 type smoke @@ -1238,6 +1145,59 @@ velocityjitter 300 300 300 velocitymultiplier 0.5 airfriction 12 + + +// decal +effect machinegun_impact +countabsolute 1 +type decal +tex 56 59 +size 5 5 +alpha 256 256 0 +originjitter 6 6 6 +lightradius 80 +lightradiusfade 800 +lightcolor 6 3.6 0.6 +// dust/smoke drifting away from the impact +effect machinegun_impact +count 5 +type smoke +tex 48 55 +color 0xFFFFFF 0xFFFFFF +size 7 7 +alpha 0 64 32 +originjitter 1 1 1 +airfriction 7 +liquidfriction 16 +velocityjitter 85 85 85 +sizeincrease 3 +// dust/smoke staying at the impact +effect machinegun_impact +count 1 +type smoke +tex 48 55 +color 0xFFFFFF 0xFFFFFF +size 7 7 +alpha 64 64 32 +sizeincrease 3 +// sparks +effect machinegun_impact +notunderwater +count 20 +type spark +tex 40 40 +color 0xFDFFD9 0xFDFFD9 +size 0.6 0.6 +alpha 256 256 768 +gravity 1 +bounce 1 +airfriction 5 +originjitter 1 1 1 +velocityjitter 400 400 400 +velocitymultiplier 0.1 + + + effect grenadelauncher_muzzleflash count 3 type smoke @@ -1264,17 +1224,109 @@ velocityjitter 300 300 300 velocitymultiplier 0.5 airfriction 12 -effect electro_muzzleflash -count 1 + + +// grenade/hagar trail +// smoke +effect TR_GRENADE +notunderwater +trailspacing 3 type smoke -color 0x202020 0x404040 +color 0x303030 0x606060 tex 0 8 -size 5 5 -alpha 256 256 512 -originjitter 1.5 1.5 1.5 -velocityjitter 6 6 6 -velocitymultiplier 0.01 -lightradius 200 +size 3 3 +alpha 64 64 64 +// bubbles +effect TR_GRENADE +underwater +trailspacing 16 +type bubble +tex 62 62 +color 0x404040 0x808080 +size 1 1 +alpha 256 256 256 +gravity -0.125 +bounce 1.5 +liquidfriction 4 +velocityjitter 16 16 16 + + + +// decal +effect grenade_explode +countabsolute 1 +type decal +tex 8 16 +size 48 48 +alpha 256 256 0 +originjitter 40 40 40 +lightradius 250 +lightradiusfade 400 +lightcolor 8 4 1 +// flare effect +effect grenade_explode +countabsolute 1 +type static +tex 35 37 +color 0x404040 0x404040 +size 48 48 +alpha 192 192 64 +// fire effect which expands then slows +effect grenade_explode +notunderwater +count 128 +type static +tex 48 55 +color 0x902010 0xFFD080 +size 16 16 +alpha 128 128 256 +bounce 1.5 +airfriction 4 +liquidfriction 4 +originjitter 8 8 8 +velocityjitter 256 256 256 +// underwater bubbles +effect grenade_explode +underwater +count 32 +type bubble +tex 62 62 +color 0x404040 0x808080 +size 3 3 +alpha 128 256 64 +gravity -0.125 +bounce 1.5 +liquidfriction 0.25 +originjitter 16 16 16 +velocityjitter 96 96 96 +// bouncing sparks +effect grenade_explode +notunderwater +count 32 +type spark +color 0x903010 0xFFD030 +size 2 2 +alpha 256 256 384 +gravity 1 +airfriction 0.2 +bounce 1.5 +liquidfriction 0.8 +velocityoffset 0 0 80 +velocityjitter 256 256 256 + + + +effect electro_muzzleflash +count 1 +type smoke +color 0x202020 0x404040 +tex 0 8 +size 5 5 +alpha 256 256 512 +originjitter 1.5 1.5 1.5 +velocityjitter 6 6 6 +velocitymultiplier 0.01 +lightradius 200 lightradiusfade 2000 lightcolor 2 1.5 0.2 effect electro_muzzleflash @@ -1289,6 +1341,180 @@ velocityjitter 300 300 300 velocitymultiplier 0.5 airfriction 12 + + +// electro trail +// glowing vapor trail +effect TR_NEXUIZPLASMA +trailspacing 4 +type static +color 0x283880 0x283880 +size 4 4 +alpha 256 256 768 +velocityjitter 16 16 16 +lightradius 90 +lighttime 0 +lightcolor 1.5 3 6 +velocitymultiplier -0.1 +// bright sparks +effect TR_NEXUIZPLASMA +trailspacing 6 +count 3 +type spark +tex 41 41 +color 0xFDFFD9 0xFDFFD9 +size 2 2 +alpha 444 512 1866 +gravity 1 +bounce 1 +velocityoffset 0 0 15 +airfriction 12 +originjitter 1 1 1 +velocityjitter 200 200 200 + + + +// decal +effect electro_impact +countabsolute 1 +type decal +tex 59 59 +size 32 32 +alpha 256 256 0 +originjitter 20 20 20 +lightradius 250 +lightradiusfade 250 +lightcolor 3.125 4.375 10 +// flare effect +effect electro_impact +countabsolute 1 +type static +tex 38 38 +color 0x80C0FF 0x80C0FF +size 32 32 +alpha 256 256 512 +// cloud of bouncing sparks +effect electro_impact +count 128 +type spark +tex 41 41 +color 0xFDFFD9 0xFDFFD9 +size 16 16 +alpha 256 256 1024 +bounce 2 +//airfriction 2 +originjitter 1 1 1 +velocityjitter 512 512 512 +// inner cloud of smoke +effect electro_impact +count 16 +type smoke +color 0x202020 0x404040 +tex 0 8 +size 24 24 +alpha 256 256 512 +originjitter 20 20 20 +velocityjitter 32 32 32 + +// decal +effect electro_ballexplode +countabsolute 1 +type decal +tex 59 59 +size 32 32 +alpha 256 256 0 +originjitter 20 20 20 +lightradius 250 +lightradiusfade 250 +lightcolor 3.125 4.375 10 +// flare effect +effect electro_ballexplode +countabsolute 1 +type static +tex 38 38 +color 0x80C0FF 0x80C0FF +size 32 32 +alpha 256 256 512 +// cloud of bouncing sparks +effect electro_ballexplode +count 128 +type spark +tex 41 41 +color 0xFDFFD9 0xFDFFD9 +size 16 16 +alpha 256 256 1024 +bounce 2 +//airfriction 2 +originjitter 1 1 1 +velocityjitter 512 512 512 +// inner cloud of smoke +effect electro_ballexplode +count 16 +type smoke +color 0x202020 0x404040 +tex 0 8 +size 24 24 +alpha 256 256 512 +originjitter 20 20 20 +velocityjitter 32 32 32 + + + +// decal +effect electro_combo +countabsolute 1 +type decal +tex 59 59 +size 64 64 +alpha 256 256 0 +originjitter 34 34 34 +lightradius 400 +lightradiusfade 300 +lightcolor 4 5 6 +// flare effect +effect electro_combo +countabsolute 1 +type static +tex 38 38 +color 0x80C0FF 0x80C0FF +size 48 48 +alpha 128 128 64 +// large sparks +effect electro_combo +count 20 +type static +color 0x2030FF 0x80C0FF +size 32 32 +alpha 256 256 256 +bounce 2 +airfriction 6 +liquidfriction 16 +//velocityoffset 0 0 120 +velocityjitter 512 512 512 +effect electro_combo +count 64 +type spark +tex 41 41 +color 0xFDFFD9 0xFDFFD9 +size 16 16 +alpha 444 512 866 +bounce 2 +//airfriction 2 +originjitter 1 1 1 +velocityjitter 512 512 512 +// inner cloud of smoke +effect electro_combo +count 0.25 +type smoke +color 0x202020 0x404040 +tex 0 8 +size 24 24 +alpha 256 256 256 +originjitter 20 20 20 +velocityjitter 32 32 32 + + + effect crylink_muzzleflash count 1 type smoke @@ -1314,31 +1540,153 @@ velocityjitter 200 200 200 velocitymultiplier 0.3 airfriction 12 + + +// crylink impact effect +// decal +effect crylink_impact +countabsolute 1 +type decal +tex 47 47 +size 8 8 +alpha 256 256 0 +originjitter 12 12 12 +//lightradius 30 +//lightradiusfade 60 +//lightcolor 1.6 0.2 2 +// purple flare effect +effect crylink_impact +countabsolute 1 +type static +tex 39 39 +color 0x504060 0x504060 +size 8 8 +alpha 256 256 512 +// purple sparks +effect crylink_impact +count 12 +type spark +color 0xA040C0 0xFFFFFF +size 1 1 +alpha 128 128 384 +gravity 1 +bounce 1.5 +velocityoffset 0 0 80 +velocityjitter 128 128 128 + + + effect nex_muzzleflash count 10 type smoke color 0x202020 0x404040 tex 0 8 size 16 16 -alpha 256 256 384 +alpha 128 128 192 originjitter 4 4 4 velocityjitter 24 24 24 velocitymultiplier 0.02 -lightradius 300 -lightradiusfade 300 -lightcolor 4 5 6 +lightradius 200 +lightradiusfade 200 +lightcolor 2 2.5 3 effect nex_muzzleflash count 150 type spark tex 41 41 color 0xD9FDFF 0xD9FDFF -size 3 3 +size 3 3 +alpha 0 128 1024 +originjitter 1 1 1 +velocityjitter 600 600 600 +velocitymultiplier 0.5 +airfriction 9 + + + +//// nex beam +//effect nex_beam +//countabsolute 1 +//type beam +//tex 60 60 +//color 0xFFFFFF 0xFFFFFF +//size 6 6 +//alpha 128 128 192 +// nex beam: ring smoke +effect nex_beam +trailspacing 32 +color 0x0B3E4F 0x0B3E4F +size 4 4 +tex 32 32 +alpha 64 256 196 +airfriction 5 +sizeincrease 2 +type static +// nex beam: drifting smoke +effect nex_beam +trailspacing 12 +color 0x28404F 0x28404F +size 4 4 +tex 48 55 +alpha 64 128 96 +airfriction 9 +sizeincrease 4 +velocityjitter 64 64 64 +type static +// nex beam: bright core +effect nex_beam +trailspacing 6 +color 0x80CDFF 0x80CDFF +size 4 4 +//tex 48 55 +alpha 256 256 2560 +type static + +// nex impact +// decal +effect nex_impact +countabsolute 1 +type decal +tex 47 47 +size 24 24 +alpha 256 256 0 +originjitter 16 16 16 +lightradius 200 +lightradiusfade 250 +lightcolor 4 6 8 +// flare effect +effect nex_impact +countabsolute 1 +type static +tex 37 37 +color 0x80C0FF 0x80C0FF +size 8 8 +alpha 256 256 256 +// small sparks which form a sphere as they slow down +//effect nex_impact +//count 256 +//type spark +//color 0x2030FF 0x80C0FF +//size 1 2 +//alpha 256 256 512 +//bounce 2 +//airfriction 8 +//liquidfriction 8 +//velocityjitter 384 384 384 +// small sparks which glow brightly but live briefly +effect nex_impact +count 128 +type spark +tex 41 41 +color 0xD9FDFF 0xD9FDFF +size 4 4 alpha 0 128 512 -originjitter 1 1 1 +bounce 2 velocityjitter 600 600 600 velocitymultiplier 0.5 airfriction 9 + + effect hagar_muzzleflash count 4 type smoke @@ -1364,6 +1712,101 @@ velocityjitter 300 300 300 velocitymultiplier 0.5 airfriction 12 + + +effect hagar_bounce +count 4 +type smoke +color 0x202020 0x404040 +tex 0 8 +size 5 5 +alpha 256 256 256 +originjitter 1.5 1.5 1.5 +velocityjitter 6 6 6 +velocitymultiplier 0.01 +lightradius 60 +lightradiusfade 300 +lightcolor 2 1.5 0.2 +effect hagar_bounce +count 30 +type spark +tex 40 40 +color 0xFFFDD9 0xFFFDD9 +size 3 3 +alpha 0 256 256 +gravity 1 +bounce 1.5 +originjitter 1 1 1 +velocityjitter 600 600 600 +velocitymultiplier 0.5 +airfriction 12 + + + +// decal +effect hagar_explode +countabsolute 1 +type decal +tex 8 16 +size 48 48 +alpha 256 256 0 +originjitter 40 40 40 +lightradius 250 +lightradiusfade 400 +lightcolor 8 4 1 +// flare effect +effect hagar_explode +countabsolute 1 +type static +tex 35 37 +color 0x404040 0x404040 +size 48 48 +alpha 192 192 64 +// fire effect which expands then slows +effect hagar_explode +notunderwater +count 128 +type static +tex 48 55 +color 0x902010 0xFFD080 +size 16 16 +alpha 128 128 256 +bounce 1.5 +airfriction 4 +liquidfriction 4 +originjitter 8 8 8 +velocityjitter 256 256 256 +// underwater bubbles +effect hagar_explode +underwater +count 32 +type bubble +tex 62 62 +color 0x404040 0x808080 +size 3 3 +alpha 128 256 64 +gravity -0.125 +bounce 1.5 +liquidfriction 0.25 +originjitter 16 16 16 +velocityjitter 96 96 96 +// bouncing sparks +effect hagar_explode +notunderwater +count 32 +type spark +color 0x903010 0xFFD030 +size 2 2 +alpha 256 256 384 +gravity 1 +airfriction 0.2 +bounce 1.5 +liquidfriction 0.8 +velocityoffset 0 0 80 +velocityjitter 256 256 256 + + + effect rocketlauncher_muzzleflash count 5 type smoke @@ -1390,66 +1833,136 @@ velocityjitter 300 300 300 velocitymultiplier 0.5 airfriction 12 -// nex beam -effect nex_beam -countabsolute 1 -type beam -tex 60 60 -color 0xFFFFFF 0xFFFFFF -size 6 6 -alpha 128 128 192 -// The RING smoke -// experimental -effect nex_beam -trailspacing 12 -color 0x0B3E4F 0x0B3E4F -size 4 4 -tex 32 32 -alpha 0 256 200 -airfriction 5 -sizeincrease 3 + + +// rocket trail +// smoke +effect TR_ROCKET +trailspacing 6 +type smoke +color 0x303030 0x606060 +tex 0 8 +size 7 7 +alpha 32 32 32 +lightradius 150 +lighttime 0 +lightcolor 6 3 1 +// fire +effect TR_ROCKET +notunderwater +trailspacing 6 type static -// The drifting smoke to accompany it -// experimental -effect nex_beam +color 0x805010 0xFFA020 +tex 0 8 +size 6 6 +alpha 144 144 288 +airfriction 8 +velocityjitter 32 32 32 +velocitymultiplier -0.5 +// bubbles +effect TR_ROCKET +underwater trailspacing 8 -color 0x28404F 0x28404F -size 4 4 -tex 48 55 -alpha 128 192 200 -airfriction 9 -sizeincrease 12 -velocityjitter 64 64 64 -type static +type bubble +tex 62 62 +color 0x404040 0x808080 +size 1 1 +alpha 256 256 256 +gravity -0.125 +bounce 1.5 +liquidfriction 4 +velocityjitter 16 16 16 +// sparks +effect TR_ROCKET +trailspacing 10 +type spark +tex 40 40 +color 0xFFFDD9 0xFFFDD9 +size 2 2 +alpha 444 512 1866 +gravity 1 +bounce 1 +velocityoffset 0 0 15 +airfriction 12 +originjitter 1 1 1 +velocityjitter 200 200 200 +velocitymultiplier -0.5 -// nex impact + + +// rocket explosion (bigger than mortar and hagar) // decal -effect nex_impact +effect rocket_explode countabsolute 1 type decal -tex 47 47 -size 24 24 +tex 8 16 +size 72 72 alpha 256 256 0 -originjitter 16 16 16 -lightradius 200 -lightradiusfade 250 -lightcolor 4 6 8 +originjitter 40 40 40 +lightradius 400 +lightradiusfade 400 +lightcolor 8 4 1 // flare effect -effect nex_impact +effect rocket_explode countabsolute 1 type static -tex 37 37 -color 0x80C0FF 0x80C0FF -size 8 8 -alpha 256 256 256 -// small sparks which form a sphere as they slow down -effect nex_impact +tex 35 37 +color 0x404040 0x404040 +size 72 72 +alpha 192 192 64 +// fire effect +effect rocket_explode +notunderwater count 256 +type static +tex 48 55 +color 0x902010 0xFFD080 +size 16 16 +alpha 128 128 256 +bounce 1.5 +airfriction 4 +liquidfriction 4 +originjitter 8 8 8 +velocityjitter 512 512 512 +// underwater bubbles +effect rocket_explode +underwater +count 64 +type bubble +tex 62 62 +color 0x404040 0x808080 +size 3 3 +alpha 128 256 64 +gravity -0.125 +bounce 1.5 +liquidfriction 0.25 +originjitter 16 16 16 +velocityjitter 144 144 144 +// bouncing sparks +effect rocket_explode +notunderwater +count 128 type spark -color 0x2030FF 0x80C0FF -size 1 2 -alpha 256 256 512 -bounce 2 -airfriction 8 -liquidfriction 8 +color 0x903010 0xFFD030 +size 2 2 +alpha 256 256 384 +gravity 1 +airfriction 0.2 +bounce 1.5 +liquidfriction 0.8 +velocityoffset 0 0 80 velocityjitter 384 384 384 + + + +effect grapple_muzzleflash +lightradius 160 +lightradiusfade 800 +lightcolor 1 0 0 + + + +effect grapple_impact +lightradius 160 +lightradiusfade 800 +lightcolor 1 0 0 diff --git a/data/qcsrc/server/arena.qc b/data/qcsrc/server/arena.qc index fb37bc48d..b56de425a 100644 --- a/data/qcsrc/server/arena.qc +++ b/data/qcsrc/server/arena.qc @@ -92,7 +92,6 @@ void reset_map() setorigin (self, self.origin); self.think = SUB_Null; self.nextthink = 0; - self.effects = self.effects - (self.effects & EF_STARDUST); } else if(self.flags & FL_PROJECTILE) // remove any projectiles left { diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index a033deb26..75ad95580 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -264,7 +264,7 @@ void SpawnThrownWeapon (vector org, float w) void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { local float take, save; - te_blood (hitloc, force, damage); + pointparticles(particleeffectnum("blood"), hitloc, force, damage); // damage resistance (ignore most of the damage from a bullet or similar) damage = max(damage - 5, 1); @@ -345,7 +345,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht damage = damage * bound(1.0, self.cvar_cl_handicap, 100.0); - te_blood (hitloc, force, damage); + pointparticles(particleeffectnum("blood"), hitloc, force, damage); if (self.pain_finished < time) //Don't switch pain sequences like crazy { if (random() > 0.5) diff --git a/data/qcsrc/server/cl_weapons.qc b/data/qcsrc/server/cl_weapons.qc index b90c5b283..f775f7eaa 100644 --- a/data/qcsrc/server/cl_weapons.qc +++ b/data/qcsrc/server/cl_weapons.qc @@ -262,10 +262,7 @@ void() W_WeaponFrame = c = c + 1; weapon_action(self.weapon, WR_THINK); if (self.weapon_nextthink > 0 && time >= self.weapon_nextthink) - { - self.weapon_nextthink_lastframe = self.weapon_nextthink; self.weapon_think(); - } } // update currentammo incase it has changed diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 94c1d9340..5a85c0d5e 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -464,7 +464,9 @@ void(float fr, float t, void() func) weapon_thinkf = } // VorteX: haste can be added here - self.weapon_nextthink = max(time, self.weapon_nextthink_lastframe + t); + if (self.weapon_nextthink < time - frametime) + self.weapon_nextthink = time; + self.weapon_nextthink = self.weapon_nextthink + t; self.weapon_think = func; if (fr == WFRAME_FIRE1 || fr == WFRAME_FIRE2) diff --git a/data/qcsrc/server/defs.qh b/data/qcsrc/server/defs.qh index 147985a8f..6a8b4dc04 100644 --- a/data/qcsrc/server/defs.qh +++ b/data/qcsrc/server/defs.qh @@ -160,7 +160,6 @@ void() w_ready; // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies) .float weapon_nextthink; .void() weapon_think; -.float weapon_nextthink_lastframe; //float PLAYER_WEAPONSELECTION_DELAY = ); float PLAYER_WEAPONSELECTION_SPEED = 18; diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index ee9cb50d5..a1bab2953 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -678,83 +678,3 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e return total_damage_to_creatures; } - -/* -entity multi_ent; -float multi_damage; -vector multi_force; - -void ClearMultiDamage (void) -{ - multi_ent = world; - multi_damage = 0; - multi_force = '0 0 0'; -} - -void ApplyMultiDamage (void) -{ - if (!multi_ent) - return; - - Damage (self, multi_ent.origin, multi_ent, 0, multi_damage, multi_force); -} - -void AddMultiDamage (entity hit, float damage, vector force) -{ - if (!hit) - return; - - if (hit != multi_ent) - { - ApplyMultiDamage (); - ClearMultiDamage (); - multi_ent = hit; - } - multi_damage = multi_damage + damage; - multi_force = multi_force + force; -} - -void FireBullets (float shotcount, vector dir, vector spread, float deathtype) -{ - vector direction; - vector source; - vector vel; - vector org; - - makevectors (self.v_angle); - - source = self.origin + v_forward * 10; // FIXME - source_x = self.absmin_z + self.size_z * 0.7; // ??? whaddabout view_ofs - - // LordHavoc: better to use normal damage - //ClearMultiDamage (); - while (shotcount > 0) - { - direction = dir + crandom () * spread_x * v_right + crandom () * spread_y * v_up; - - traceline (source, source + direction * 2048, FALSE, self); - if (trace_fraction != 1.0) - { - vel = normalize (direction + v_up * crandom () + v_right * crandom ()); - vel = vel + 2 * trace_plane_normal; - vel = vel * 200; - - org = trace_endpos - direction * 4; - - if (!trace_ent.takedamage) - te_gunshot (org); - // LordHavoc: better to use normal damage - //AddMultiDamage (trace_ent, 4, direction * 4); - Damage (trace_ent, self, self, 4, deathtype, trace_endpos, direction * 4); - } - - shotcount = shotcount + 1; - } - - // LordHavoc: better to use normal damage - //ApplyMultiDamage (); -} -*/ - - - diff --git a/data/qcsrc/server/g_decors.qc b/data/qcsrc/server/g_decors.qc index 5b5c1fb85..b153f8cf4 100644 --- a/data/qcsrc/server/g_decors.qc +++ b/data/qcsrc/server/g_decors.qc @@ -189,37 +189,6 @@ void(entity e) removedecor = }; -void(vector org, vector vel, float amount) blood = -{ - te_blood(org, vel, amount); -}; - -void(vector org, vector vel, float amount) spark = -{ - te_spark(org, vel, amount); -}; - -void(vector m1, vector m2, float vel, float amount) bloodshower = -{ - te_bloodshower(m1, m2, vel, amount); -}; - -void(vector org, float quad) bulletpuff = -{ - if (quad) - te_gunshotquad(org); - else - te_gunshot(org); -}; - -void(vector org, float quad) nailpuff = -{ - if (quad) - te_superspikequad(org); - else - te_superspike(org); -}; - // used for various little bouncing debris to avoid getting stuck in the air void() DecorThink = { diff --git a/data/qcsrc/server/g_hook.qc b/data/qcsrc/server/g_hook.qc index 93760191f..107dc5a03 100644 --- a/data/qcsrc/server/g_hook.qc +++ b/data/qcsrc/server/g_hook.qc @@ -166,6 +166,7 @@ void GrapplingHookTouch (void) return; } + pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1); sound (self, CHAN_BODY, "weapons/hook_impact.wav", 1, ATTN_NORM); self.state = 1; @@ -208,7 +209,7 @@ void FireGrapplingHook (void) sound (self, CHAN_WEAPON, "weapons/hook_fire.wav", 1, ATTN_NORM); org = self.origin + self.view_ofs + v_forward * 8 - v_right * 8 + '0 0 -12'; - te_customflash(org, 160, 0.2, '1 0 0'); + pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1); missile = spawn (); missile.owner = self; diff --git a/data/qcsrc/server/g_violence.qc b/data/qcsrc/server/g_violence.qc index 80efed986..91f4fbf60 100644 --- a/data/qcsrc/server/g_violence.qc +++ b/data/qcsrc/server/g_violence.qc @@ -10,7 +10,7 @@ void GibDamage (entity inflictor, entity attacker, float damage, float deathtype sound (self, CHAN_IMPACT, "misc/gib_splat03.wav", 1, ATTN_NORM); else if (r < 0.75) sound (self, CHAN_IMPACT, "misc/gib_splat04.wav", 1, ATTN_NORM); - te_blood (self.origin + '0 0 1', '0 0 30', 10); + pointparticles(particleeffectnum("blood"), self.origin + '0 0 1', '0 0 30', 10); self.health = self.health - damage; if (self.health <= -1000) { diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 1073c1f66..accd7d43d 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -1,6 +1,3 @@ -//void Item_ClearRespawnEffect (void) { -// self.effects = self.effects - (self.effects & EF_STARDUST); -//} .float max_armorvalue; @@ -11,12 +8,8 @@ void Item_Respawn (void) sound (self, CHAN_VOICE, "misc/itemrespawn.wav", 1, ATTN_NORM); // play respawn sound setorigin (self, self.origin); - // LordHavoc: replaced respawn stardust effect with a custom te_wizspike - te_wizspike(self.origin + self.mins_z * '0 0 1' + '0 0 48'); - //// Savage: Add simple Respawn effect and make sure it gets removed - //self.effects = self.effects | EF_STARDUST; - //self.think = Item_ClearRespawnEffect; - //self.nextthink = time + 0.1; + //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1); + pointparticles(particleeffectnum("item_respawn"), self.origin + 0.5 * (self.mins + self.maxs), '0 0 0', 1); } void Item_Touch (void) @@ -192,9 +185,6 @@ void Item_Touch (void) if (!pickedup) return; - // Savage: Remove the respawn effect if still present - self.effects = self.effects - (self.effects & EF_STARDUST); - sound (self, CHAN_BODY, self.noise, 1, ATTN_NORM); sound (other, CHAN_AUTO, self.item_pickupsound, 1, ATTN_NORM); diff --git a/data/qcsrc/server/t_jumppads.qc b/data/qcsrc/server/t_jumppads.qc index b14b4a174..ba90bd7a3 100644 --- a/data/qcsrc/server/t_jumppads.qc +++ b/data/qcsrc/server/t_jumppads.qc @@ -118,12 +118,19 @@ void() trigger_push_touch = if (other.deadflag && other.classname == "player") return; + if(self.target) + self.movedir = trigger_push_calculatevelocity(other.origin, self.enemy, self.height); + + other.flags = other.flags - (other.flags & FL_ONGROUND); + // reset tracking of oldvelocity for impact damage (sudden velocity changes) + other.oldvelocity = other.velocity = self.movedir; + if (other.classname == "player") { if(self.pushltime < time) // prevent "snorring" sound when a player hits the jumppad more than once { // flash when activated - te_smallflash(other.origin); + pointparticles(particleeffectnum("jumppad_activate"), other.origin, other.velocity, 1); sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM); self.pushltime = time + 0.2; } @@ -145,12 +152,6 @@ void() trigger_push_touch = other.jumppadcount = TRUE; } - if(self.target) - self.movedir = trigger_push_calculatevelocity(other.origin, self.enemy, self.height); - - other.flags = other.flags - (other.flags & FL_ONGROUND); - // reset tracking of oldvelocity for impact damage (sudden velocity changes) - other.oldvelocity = other.velocity = self.movedir; // reset tracking of who pushed you into a hazard (for kill credit) other.pushltime = 0; diff --git a/data/qcsrc/server/t_teleporters.qc b/data/qcsrc/server/t_teleporters.qc index 1db109fcb..c7263044b 100644 --- a/data/qcsrc/server/t_teleporters.qc +++ b/data/qcsrc/server/t_teleporters.qc @@ -67,12 +67,12 @@ void Teleport_Touch (void) // Make teleport effect where the player left sound (other, CHAN_ITEM, "misc/teleport.wav", 1, ATTN_NORM); - te_teleport (other.origin); + pointparticles(particleeffectnum("teleport"), other.origin, '0 0 0', 1); // Make teleport effect where the player arrived sound (other, CHAN_ITEM, "misc/teleport.wav", 1, ATTN_NORM); makevectors (self.enemy.mangle); - te_teleport (self.enemy.origin + v_forward * 32); + pointparticles(particleeffectnum("teleport"), self.enemy.origin + v_forward * 32, '0 0 0', 1); // Relocate the player setorigin (other, self.enemy.origin + '0 0 1' * (1 - other.mins_z - 24)); diff --git a/data/qcsrc/server/w_common.qc b/data/qcsrc/server/w_common.qc index edef537da..6629002b5 100644 --- a/data/qcsrc/server/w_common.qc +++ b/data/qcsrc/server/w_common.qc @@ -1,31 +1,4 @@ -// increments sprite frame, loops when end is hit.. simple - -float TE_SMOKE =77; -void (vector vec) WriteVec = -{ - WriteCoord (MSG_BROADCAST, vec_x); - WriteCoord (MSG_BROADCAST, vec_y); - WriteCoord (MSG_BROADCAST, vec_z); -} -void (vector org, vector dir, float counts) W_Smoke = -{ - WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); - WriteByte (MSG_BROADCAST, TE_SMOKE); - WriteVec (org); - WriteVec (dir); - WriteByte (MSG_BROADCAST, counts); -} - -// increments sprite frame, loops when end is hit.. simple -void animate_sprite (float startframe, float frame_count) -{ - if ((self.frame - startframe) >= (frame_count - 1 )) - self.frame = startframe; - else - self.frame = self.frame + 1; -} - void W_GiveWeapon (entity e, float wep, string name) { entity oldself; @@ -68,10 +41,6 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f { traceline_hitcorpse (self, start, end, FALSE, self); - //if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) - //if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) - // te_plasmaburn (trace_endpos - dir * 6); - // if it is world we can't hurt it so stop now if (trace_ent == world || trace_fraction == 1) break; @@ -163,9 +132,9 @@ void fireBullet (vector start, vector dir, float spread, float damage, float for if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) { if (dtype == IT_SHOTGUN) - te_gunshot (trace_endpos); + pointparticles(particleeffectnum("shotgun_impact"), trace_endpos, trace_plane_normal * 1000, 1); else - te_spike (trace_endpos); + pointparticles(particleeffectnum("machinegun_impact"), trace_endpos, trace_plane_normal * 1000, 1); } Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force); } diff --git a/data/qcsrc/server/w_crylink.qc b/data/qcsrc/server/w_crylink.qc index dfd55e375..613dd2daf 100644 --- a/data/qcsrc/server/w_crylink.qc +++ b/data/qcsrc/server/w_crylink.qc @@ -11,28 +11,8 @@ void W_Crylink_Touch (void) return; } RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage"), cvar("g_balance_crylink_primary_edgedamage"), cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force"), IT_CRYLINK); - te_gunshotquad(self.origin); + pointparticles(particleeffectnum("crylink_impact"), self.origin, '0 0 0', 1); remove (self); - /* - //te_smallflash(self.origin); - if (other.takedamage == DAMAGE_AIM) - { - remove (self); - return; - } - self.owner = world; - self.touch = SUB_Null; - setmodel (self, "models/plasma.mdl"); // precision set below - setsize (self, '0 0 0', '0 0 0'); - self.gravity = 0; - self.glow_size = 0; - self.glow_color = 0; - self.think = SUB_Remove; - self.movetype = MOVETYPE_NONE; - self.effects = EF_LOWPRECISION; - SUB_SetFade(self, time, 1); - //remove (self); - */ } void W_Crylink_Touch2 (void) @@ -43,28 +23,8 @@ void W_Crylink_Touch2 (void) return; } RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage"), cvar("g_balance_crylink_secondary_edgedamage"), cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force"), IT_CRYLINK); - te_gunshotquad(self.origin); + pointparticles(particleeffectnum("crylink_impact"), self.origin, '0 0 0', 1); remove (self); - /* - //te_smallflash(self.origin); - if (other.takedamage == DAMAGE_AIM) - { - remove (self); - return; - } - self.owner = world; - self.touch = SUB_Null; - setmodel (self, "models/plasma.mdl"); // precision set below - setsize (self, '0 0 0', '0 0 0'); - self.gravity = 0; - self.glow_size = 0; - self.glow_color = 0; - self.think = SUB_Remove; - self.movetype = MOVETYPE_NONE; - self.effects = EF_LOWPRECISION; - SUB_SetFade(self, time, 1); - //remove (self); - */ } void W_Crylink_Attack (void) @@ -75,11 +35,10 @@ void W_Crylink_Attack (void) if (cvar("g_use_ammunition")) self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_primary_ammo"); - W_SetupShot (self, '11 8 -8', FALSE, 2, "weapons/crylink_fire.wav"); - te_smallflash(w_shotorg); + W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/crylink_fire.wav"); shots = cvar("g_balance_crylink_primary_shots"); - pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg + v_forward * 12, v_forward * 1000, shots); + pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots); while (counter < shots) { proj = spawn (); @@ -121,11 +80,10 @@ void W_Crylink_Attack2 (void) if (cvar("g_use_ammunition")) self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_secondary_ammo"); - W_SetupShot (self, '11 8 -8', FALSE, 2, "weapons/crylink_fire.wav"); - //te_smallflash(w_shotorg); + W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/crylink_fire.wav"); shots = cvar("g_balance_crylink_secondary_shots"); - pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg + v_forward * 12, v_forward * 1000, shots); + pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots); while (counter < shots) { proj = spawn (); @@ -166,14 +124,14 @@ void W_Crylink_Attack3 (void) { if (cvar("g_use_ammunition")) self.ammo_cells = self.ammo_cells - cvar("g_balance_crylink_primary_ammo"); - W_SetupShot (self, '11 8 -8', TRUE, 0, "weapons/crylink_fire.wav"); + W_SetupShot (self, '25 8 -8', TRUE, 0, "weapons/crylink_fire.wav"); // use traceline_hitcorpse to make sure it can hit gibs and corpses too traceline_hitcorpse(self, w_shotorg, w_shotorg + w_shotdir * 1000, FALSE, self); - te_smallflash(w_shotorg); - te_plasmaburn(trace_endpos); - te_lightning2(self, w_shotorg, trace_endpos); + pointparticles(particleeffectnum("lightning_muzzleflash", w_shotorg, w_shotdir * 1000, 1); + pointparticles(particleeffectnum("lightning_impact", trace_endpos, trace_plane_normal * 1000, 1); + trailparticles(world, particleeffectnum("lightning_beam", w_shotorg, trace_endpos); if (trace_fraction < 1) Damage(trace_ent, self, self, cvar("g_balance_crylink_primary_damage"), IT_CRYLINK, trace_endpos, '0 0 0'); diff --git a/data/qcsrc/server/w_electro.qc b/data/qcsrc/server/w_electro.qc index eb7d67650..d8327a087 100644 --- a/data/qcsrc/server/w_electro.qc +++ b/data/qcsrc/server/w_electro.qc @@ -3,21 +3,18 @@ void W_Plasma_Explode (void) { vector org2; org2 = findbetterlocation (self.origin, 8); - WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); - WriteByte (MSG_BROADCAST, 79); - WriteCoord (MSG_BROADCAST, org2_x); - WriteCoord (MSG_BROADCAST, org2_y); - WriteCoord (MSG_BROADCAST, org2_z); - WriteCoord (MSG_BROADCAST, 0); // SeienAbunae: groan... Useless clutter - WriteCoord (MSG_BROADCAST, 0); - WriteCoord (MSG_BROADCAST, 0); - WriteByte (MSG_BROADCAST, 155); self.event_damage = SUB_Null; if (self.movetype == MOVETYPE_BOUNCE) + { + pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1); RadiusDamage (self, self.owner, cvar("g_balance_electro_secondary_damage"), cvar("g_balance_electro_secondary_edgedamage"), cvar("g_balance_electro_secondary_radius"), world, cvar("g_balance_electro_secondary_force"), IT_ELECTRO); + } else + { + pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1); RadiusDamage (self, self.owner, cvar("g_balance_electro_primary_damage"), cvar("g_balance_electro_primary_edgedamage"), cvar("g_balance_electro_primary_radius"), world, cvar("g_balance_electro_primary_force"), IT_ELECTRO); + } sound (self, CHAN_BODY, "weapons/electro_impact.wav", 1, ATTN_NORM); remove (self); @@ -27,13 +24,12 @@ void W_Plasma_Explode_Combo (void) { vector org2; org2 = findbetterlocation (self.origin, 8); - te_spikequad(self.origin); + pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1); sound (self, CHAN_BODY, "weapons/electro_impact_combo.wav", 1, ATTN_NORM); self.event_damage = SUB_Null; RadiusDamage (self, self.owner, cvar("g_balance_electro_combo_damage"), cvar("g_balance_electro_combo_edgedamage"), cvar("g_balance_electro_combo_radius"), world, cvar("g_balance_electro_combo_force"), IT_ELECTRO); - te_explosionrgb(org2, '0.5 0.5 1'); remove (self); } @@ -99,9 +95,9 @@ void() W_Electro_Attack { local entity proj; - W_SetupShot (self, '11 8 -8', FALSE, 2, "weapons/electro_fire.wav"); + W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/electro_fire.wav"); - pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); proj = spawn (); proj.classname = "plasma_prim"; @@ -133,9 +129,9 @@ void() W_Electro_Attack2 { local entity proj; - W_SetupShot (self, '8 4.5 -13', FALSE, 2, "weapons/electro_fire2.wav"); + W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/electro_fire2.wav"); - pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); proj = spawn (); proj.classname = "plasma"; @@ -153,7 +149,7 @@ void() W_Electro_Attack2 //proj.glow_size = 50; //proj.glow_color = 45; proj.movetype = MOVETYPE_BOUNCE; - proj.velocity = (v_forward + randomvec() * cvar("g_balance_electro_secondary_spread")) * cvar("g_balance_electro_secondary_speed") + v_up * cvar("g_balance_electro_secondary_speed_up"); + proj.velocity = (w_shotdir + randomvec() * cvar("g_balance_electro_secondary_spread")) * cvar("g_balance_electro_secondary_speed") + v_up * cvar("g_balance_electro_secondary_speed_up"); W_SetupProjectileVelocity(proj); proj.touch = W_Plasma_Touch; setmodel(proj, "models/ebomb.mdl"); // precision set above diff --git a/data/qcsrc/server/w_grenadelauncher.qc b/data/qcsrc/server/w_grenadelauncher.qc index 159c1f617..9dca36fb2 100644 --- a/data/qcsrc/server/w_grenadelauncher.qc +++ b/data/qcsrc/server/w_grenadelauncher.qc @@ -3,8 +3,7 @@ void W_Grenade_Explode (void) { vector org2; org2 = findbetterlocation (self.origin, 12); - te_explosion (org2); - //effect (org2, "models/sprites/grenexpl.spr", 0, 12, 35); + pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1); sound (self, CHAN_BODY, "weapons/grenade_impact.wav", 1, ATTN_NORM); self.event_damage = SUB_Null; @@ -17,8 +16,7 @@ void W_Grenade_Explode2 (void) { vector org2; org2 = findbetterlocation (self.origin, 12); - te_explosion (org2); - //effect (org2, "models/sprites/grenexpl.spr", 0, 12, 35); + pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1); sound (self, CHAN_BODY, "weapons/grenade_impact.wav", 1, ATTN_NORM); self.event_damage = SUB_Null; @@ -81,9 +79,10 @@ void W_Grenade_Attack (void) if (cvar("g_use_ammunition")) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo"); - W_SetupShot (self, '11 8 -8', FALSE, 4, "weapons/grenade_fire.wav"); + W_SetupShot (self, '25 6 -8', FALSE, 4, "weapons/grenade_fire.wav"); + //W_SetupShot (self, '25 8 -8', FALSE, 4, "weapons/grenade_fire.wav"); // TODO: move model to the right a little - pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); gren = spawn (); gren.owner = self; @@ -101,7 +100,7 @@ void W_Grenade_Attack (void) gren.nextthink = time + cvar("g_balance_grenadelauncher_primary_lifetime"); gren.think = W_Grenade_Explode; gren.touch = W_Grenade_Touch1; - gren.velocity = v_forward * cvar("g_balance_grenadelauncher_primary_speed") + v_up * cvar("g_balance_grenadelauncher_primary_speed_up"); + gren.velocity = w_shotdir * cvar("g_balance_grenadelauncher_primary_speed") + v_up * cvar("g_balance_grenadelauncher_primary_speed_up"); W_SetupProjectileVelocity(gren); gren.avelocity_x = random () * -500 - 500; @@ -115,9 +114,10 @@ void W_Grenade_Attack2 (void) if (cvar("g_use_ammunition")) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo"); - W_SetupShot (self, '11 8 -8', FALSE, 4, "weapons/grenade_fire.wav"); + W_SetupShot (self, '25 6 -8', FALSE, 4, "weapons/grenade_fire.wav"); + //W_SetupShot (self, '25 8 -8', FALSE, 4, "weapons/grenade_fire.wav"); // TODO: move model to the right a little - pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); gren = spawn (); gren.owner = self; @@ -139,7 +139,7 @@ void W_Grenade_Attack2 (void) gren.health = 10; gren.damageforcescale = 4; gren.event_damage = W_Grenade_Damage; - gren.velocity = v_forward * cvar("g_balance_grenadelauncher_secondary_speed") + v_up * cvar("g_balance_grenadelauncher_secondary_speed_up"); + gren.velocity = w_shotdir * cvar("g_balance_grenadelauncher_secondary_speed") + v_up * cvar("g_balance_grenadelauncher_secondary_speed_up"); W_SetupProjectileVelocity(gren); gren.avelocity = '100 150 100'; diff --git a/data/qcsrc/server/w_hagar.qc b/data/qcsrc/server/w_hagar.qc index e99d9c838..63ba7da6d 100644 --- a/data/qcsrc/server/w_hagar.qc +++ b/data/qcsrc/server/w_hagar.qc @@ -3,8 +3,7 @@ void W_Hagar_Explode (void) vector org2; float b; org2 = findbetterlocation (self.origin, 12); - te_explosion (org2); - //effect (org2, "models/sprites/hagar.spr", 0, 12, 35); + pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); b = crandom(); if (b<-0.7) sound (self, CHAN_BODY, "weapons/hagexp1.wav", 1, ATTN_NORM); @@ -24,8 +23,7 @@ void W_Hagar_Explode2 (void) vector org2; float b; org2 = findbetterlocation (self.origin, 12); - te_explosion (org2); - //effect (org2, "models/sprites/hagar.spr", 0, 12, 35); + pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1); b = crandom(); if (b<-0.7) sound (self, CHAN_BODY, "weapons/hagexp1.wav", 1, ATTN_NORM); @@ -65,6 +63,7 @@ void W_Hagar_Touch2 (void) self.think(); } else { self.cnt++; + pointparticles(particleeffectnum("hagar_bounce"), self.origin, self.velocity, 1); } } @@ -81,9 +80,10 @@ void W_Hagar_Attack (void) if (cvar("g_use_ammunition")) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_primary_ammo"); - W_SetupShot (self, '11 5 -8', FALSE, 2, "weapons/hagar_fire.wav"); + W_SetupShot (self, '25 5 -8', FALSE, 2, "weapons/hagar_fire.wav"); + //W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right - pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); missile.owner = self; @@ -119,9 +119,10 @@ void W_Hagar_Attack2 (void) if (cvar("g_use_ammunition")) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_secondary_ammo"); - W_SetupShot (self, '11 5 -8', FALSE, 2, "weapons/hagar_fire.wav"); + W_SetupShot (self, '25 5 -8', FALSE, 2, "weapons/hagar_fire.wav"); + //W_SetupShot (self, '25 8 -8', FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right - pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); missile.owner = self; diff --git a/data/qcsrc/server/w_laser.qc b/data/qcsrc/server/w_laser.qc index 0737e3a4e..13b395728 100644 --- a/data/qcsrc/server/w_laser.qc +++ b/data/qcsrc/server/w_laser.qc @@ -4,6 +4,7 @@ void W_Laser_Touch (void) { vector dir; vector org2; + vector normal; if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) { @@ -14,10 +15,11 @@ void W_Laser_Touch (void) if (other == self.owner) return; + normal = trace_plane_normal; dir = normalize (self.owner.origin - self.origin); org2 = findbetterlocation (self.origin, 8); - te_knightspike(org2); + pointparticles(particleeffectnum("laser_impact"), org2, normal * 1000, 1); self.event_damage = SUB_Null; @@ -34,9 +36,8 @@ void W_Laser_Attack (float issecondary) { local entity missile; - W_SetupShot (self, '11 8 -8', FALSE, 3, "weapons/lasergun_fire.wav"); - //te_customflash(w_shotorg, 160, 0.2, '1 0 0'); - pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg + v_forward * 8, v_forward * 1000, 1); + W_SetupShot (self, '25 8 -8', FALSE, 3, "weapons/lasergun_fire.wav"); + pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); missile.owner = self; diff --git a/data/qcsrc/server/w_nex.qc b/data/qcsrc/server/w_nex.qc index 49ac8c0ff..7cba1280b 100644 --- a/data/qcsrc/server/w_nex.qc +++ b/data/qcsrc/server/w_nex.qc @@ -1,8 +1,8 @@ void W_Nex_Attack (void) { - //w_shotorg = self.origin + self.view_ofs + v_forward * 5 + v_right * 14 + v_up * -7; - W_SetupShot (self, '5 14 -8', TRUE, 5, "weapons/nexfire.wav"); + W_SetupShot (self, '25 8 -4', TRUE, 5, "weapons/nexfire.wav"); + //W_SetupShot (self, '25 8 -8', TRUE, 2, "weapons/nexfire.wav"); // TODO: move model down a little // assure that nexdamage is high enough in minstagib if (g_minstagib) @@ -16,13 +16,10 @@ void W_Nex_Attack (void) announce(self, "announcer/male/yoda.ogg"); } - pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg + v_forward * 32, v_forward * 1000, 1); + pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); - // show as if shot started outside of gun - // muzzleflash light - //te_smallflash (w_shotorg + w_shotdir * 24); // beam effect - trailparticles(world, particleeffectnum("nex_beam"), w_shotorg + w_shotdir * 28, trace_endpos); + trailparticles(world, particleeffectnum("nex_beam"), w_shotorg, trace_endpos); // flash and burn the wall if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) pointparticles(particleeffectnum("nex_impact"), trace_endpos - w_shotdir * 6, '0 0 0', 1); @@ -36,22 +33,6 @@ void W_Nex_Attack (void) else self.ammo_cells = self.ammo_cells - cvar("g_balance_nex_ammo"); } - - /* - local entity flash; - flash = spawn (); - setorigin (flash, self.origin + self.view_ofs + v_forward * 33 + v_right * 14 + v_up * -7); - flash.angles = vectoangles (w_shotdir); - //setattachment(flash, self.weaponentity, "bone01"); - //flash.origin = '150 0 0'; - //setattachment(flash, self.weaponentity, ""); - //flash.origin = '150 -16 -8'; - //flash.angles_z = 90; - //flash.scale = 4; - setmodel (flash, "models/nexflash.md3"); // precision set below - SUB_SetFade (flash, time, 0.4); - flash.effects = flash.effects | EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION; - */ } diff --git a/data/qcsrc/server/w_rocketlauncher.qc b/data/qcsrc/server/w_rocketlauncher.qc index ba0e99dbd..982d6be04 100644 --- a/data/qcsrc/server/w_rocketlauncher.qc +++ b/data/qcsrc/server/w_rocketlauncher.qc @@ -7,13 +7,7 @@ void W_Rocket_Explode (void) sound (self, CHAN_BODY, "weapons/rocket_impact.wav", 1, ATTN_NORM); org2 = findbetterlocation (self.origin, 16); - //te_explosion (org2); - // LordHavoc: TE_TEI_BIGEXPLOSION - WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); - WriteByte (MSG_BROADCAST, 78); - WriteCoord (MSG_BROADCAST, org2_x); - WriteCoord (MSG_BROADCAST, org2_y); - WriteCoord (MSG_BROADCAST, org2_z); + pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1); //effect (org2, "models/sprites/rockexpl.spr", 0, 12, 35); self.event_damage = SUB_Null; @@ -204,9 +198,9 @@ void W_Rocket_Attack (void) if (cvar("g_use_ammunition") && !g_rocketarena) self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo"); - W_SetupShot (self, '8 3 -8', FALSE, 5, "weapons/rocket_fire.wav"); - //te_smallflash(w_shotorg); - pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg + v_forward * 12, v_forward * 1000, 1); + W_SetupShot (self, '25 3 -8', FALSE, 5, "weapons/rocket_fire.wav"); + //W_SetupShot (self, '25 8 -8', FALSE, 5, "weapons/rocket_fire.wav"); // TODO: move model to the right a little + pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); missile.owner = self; diff --git a/data/qcsrc/server/w_shotgun.qc b/data/qcsrc/server/w_shotgun.qc index 02142699a..a35c3d054 100644 --- a/data/qcsrc/server/w_shotgun.qc +++ b/data/qcsrc/server/w_shotgun.qc @@ -13,19 +13,17 @@ void W_Shotgun_Attack (void) f = cvar("g_balance_shotgun_primary_force"); spread = cvar("g_balance_shotgun_primary_spread"); - W_SetupShot (self, '11 8 -8', TRUE, 5, "weapons/shotgun_fire.wav"); + W_SetupShot (self, '25 8 -8', TRUE, 5, "weapons/shotgun_fire.wav"); for (sc = 0;sc < bullets;sc = sc + 1) fireBullet (w_shotorg, w_shotdir, spread, d, f, IT_SHOTGUN, sc < 3); if (cvar("g_use_ammunition")) self.ammo_shells = self.ammo_shells - cvar("g_balance_shotgun_primary_ammo"); - pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg + v_forward * 6, v_forward * 1000, cvar("g_balance_shotgun_primary_ammo")); - //W_Smoke(w_shotorg + v_forward * 8, v_forward, 12); - //te_smallflash(w_shotorg); + pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, cvar("g_balance_shotgun_primary_ammo")); // casing code if (cvar("g_casings") >= 1) - SpawnCasing (w_shotorg, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1); + SpawnCasing (w_shotorg, ((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1); // muzzle flash for 1st person view flash = spawn(); @@ -58,19 +56,17 @@ void W_Shotgun_Attack2 (void) f = cvar("g_balance_shotgun_secondary_force"); spread = cvar("g_balance_shotgun_secondary_spread"); - W_SetupShot (self, '11 8 -8', TRUE, 5, "weapons/shotgun_fire.wav"); + W_SetupShot (self, '25 8 -8', TRUE, 5, "weapons/shotgun_fire.wav"); for (sc = 0;sc < bullets;sc = sc + 1) fireBullet (w_shotorg, w_shotdir, spread, d, f, IT_SHOTGUN, sc < 3); if (cvar("g_use_ammunition")) self.ammo_shells = self.ammo_shells - cvar("g_balance_shotgun_secondary_ammo"); - pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg + v_forward * 6, v_forward * 1000, cvar("g_balance_shotgun_secondary_ammo")); - //W_Smoke(w_shotorg + v_forward * 8, v_forward, 12); - //te_smallflash(w_shotorg); + pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, cvar("g_balance_shotgun_secondary_ammo")); // casing code if (cvar("g_casings") >= 1) - SpawnCasing (w_shotorg, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1); + SpawnCasing (w_shotorg, ((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1); flash = spawn(); setorigin(flash, '53 5 0'); diff --git a/data/qcsrc/server/w_uzi.qc b/data/qcsrc/server/w_uzi.qc index dd4ff0e0b..ed59b74d4 100644 --- a/data/qcsrc/server/w_uzi.qc +++ b/data/qcsrc/server/w_uzi.qc @@ -23,7 +23,8 @@ void W_Uzi_Attack (void) else self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo"); } - W_SetupShot (self, '11 5.5 -8', TRUE, 0, "weapons/uzi_fire.wav"); + W_SetupShot (self, '25 5.5 -8', TRUE, 0, "weapons/uzi_fire.wav"); + //W_SetupShot (self, '25 8 -8', TRUE, 0, "weapons/uzi_fire.wav"); // TODO: move model to the right a little if (!g_norecoil) { self.punchangle_x = random () - 0.5; @@ -38,7 +39,7 @@ void W_Uzi_Attack (void) else fireBullet (w_shotorg, w_shotdir, cvar("g_balance_uzi_sustained_spread"), cvar("g_balance_uzi_sustained_damage"), cvar("g_balance_uzi_sustained_force"), IT_UZI, (self.uzi_bulletcounter & 3) == 0); - pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg + v_forward * 14, v_forward * 1000, 1); + pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); // muzzle flash for 1st person view flash = spawn(); @@ -70,7 +71,7 @@ void W_Uzi_Attack (void) // casing code if (cvar("g_casings") >= 2) - SpawnCasing (w_shotorg + v_forward * 10, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3); + SpawnCasing (w_shotorg + v_forward * 10, ((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3); } // weapon frames -- 2.39.2