From 5e12a89c7f784ba0ccecc3a51229a7c63bb0c768 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 12 Nov 2024 12:55:59 +1000 Subject: [PATCH] Move polytrail cvars to a separate config file --- polytrails.cfg | 68 ++++++++++++++++++++++++++++++ qcsrc/client/weapons/projectile.qc | 60 -------------------------- qcsrc/client/weapons/projectile.qh | 61 +++++++++++++++++++++++++++ xonotic-client.cfg | 3 +- 4 files changed, 130 insertions(+), 62 deletions(-) create mode 100644 polytrails.cfg diff --git a/polytrails.cfg b/polytrails.cfg new file mode 100644 index 000000000..7dda27c6b --- /dev/null +++ b/polytrails.cfg @@ -0,0 +1,68 @@ +// Poly Trails +// a polygon rendering system for trails + +seta cl_polytrails 1 "enable polygon-based trail effect drawing (looks better but may impact performance)" + +// electro primary bolt +seta cl_polytrails_electro_bolt 1 +seta cl_polytrails_electro_bolt_rgb0 "0.75 0.75 1" +seta cl_polytrails_electro_bolt_rgb1 "0.45 0.45 1" +seta cl_polytrails_electro_bolt_rgb2 "0.1 0.1 0.75" +seta cl_polytrails_electro_bolt_alpha0 1 +seta cl_polytrails_electro_bolt_alpha1 0.5 +seta cl_polytrails_electro_bolt_alpha2 0 +seta cl_polytrails_electro_bolt_thickness0 5 +seta cl_polytrails_electro_bolt_thickness1 5 +seta cl_polytrails_electro_bolt_thickness2 0 +seta cl_polytrails_electro_bolt_lifetime 0.27 +seta cl_polytrails_electro_bolt_segmentsize 10 +seta cl_polytrails_electro_bolt_noise 5 +seta cl_polytrails_electro_bolt_noisefunc "chaotic" + +// electro secondary orb +seta cl_polytrails_electro_orb 1 +seta cl_polytrails_electro_orb_rgb0 "0.8 0.8 1" +seta cl_polytrails_electro_orb_rgb1 "0.5 0.5 1" +seta cl_polytrails_electro_orb_rgb2 "0.1 0.1 0.7" +seta cl_polytrails_electro_orb_alpha0 1 +seta cl_polytrails_electro_orb_alpha1 0.5 +seta cl_polytrails_electro_orb_alpha2 0 +seta cl_polytrails_electro_orb_thickness0 15 +seta cl_polytrails_electro_orb_thickness1 7 +seta cl_polytrails_electro_orb_thickness2 0 +seta cl_polytrails_electro_orb_lifetime 0.18 +seta cl_polytrails_electro_orb_segmentsize 10 +seta cl_polytrails_electro_orb_noise 10 +seta cl_polytrails_electro_orb_noisefunc "chaotic" + +// crylink bouncing projectile +seta cl_polytrails_crylink_bouncing 1 +seta cl_polytrails_crylink_bouncing_rgb0 "0.7 0 1" +seta cl_polytrails_crylink_bouncing_rgb1 "0.5 0 1" +seta cl_polytrails_crylink_bouncing_rgb2 "0.1 0 0.8" +seta cl_polytrails_crylink_bouncing_alpha0 0.5 +seta cl_polytrails_crylink_bouncing_alpha1 0.2 +seta cl_polytrails_crylink_bouncing_alpha2 0 +seta cl_polytrails_crylink_bouncing_thickness0 5 +seta cl_polytrails_crylink_bouncing_thickness1 3 +seta cl_polytrails_crylink_bouncing_thickness2 3 +seta cl_polytrails_crylink_bouncing_lifetime 0.15 +seta cl_polytrails_crylink_bouncing_segmentsize 80 +seta cl_polytrails_crylink_bouncing_noise 0 +seta cl_polytrails_crylink_bouncing_noisefunc "none" + +// crylink bolt projectiles +seta cl_polytrails_crylink_bolt 1 +seta cl_polytrails_crylink_bolt_rgb0 "0.7 0 1" +seta cl_polytrails_crylink_bolt_rgb1 "0.5 0 1" +seta cl_polytrails_crylink_bolt_rgb2 "0.1 0 0.8" +seta cl_polytrails_crylink_bolt_alpha0 0.75 +seta cl_polytrails_crylink_bolt_alpha1 0.2 +seta cl_polytrails_crylink_bolt_alpha2 0 +seta cl_polytrails_crylink_bolt_thickness0 5 +seta cl_polytrails_crylink_bolt_thickness1 3 +seta cl_polytrails_crylink_bolt_thickness2 3 +seta cl_polytrails_crylink_bolt_lifetime 0.15 +seta cl_polytrails_crylink_bolt_segmentsize 80 +seta cl_polytrails_crylink_bolt_noise 0 +seta cl_polytrails_crylink_bolt_noisefunc "none" diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 8bbb435e0..be041ffc0 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -184,66 +184,6 @@ void Ent_RemoveProjectile(entity this) } } -bool autocvar_cl_polytrails_crylink_bouncing = true; -vector autocvar_cl_polytrails_crylink_bouncing_rgb0 = '0.7 0 1'; -vector autocvar_cl_polytrails_crylink_bouncing_rgb1 = '0.5 0 1'; -vector autocvar_cl_polytrails_crylink_bouncing_rgb2 = '0.1 0 0.8'; -float autocvar_cl_polytrails_crylink_bouncing_alpha0 = 0.5; -float autocvar_cl_polytrails_crylink_bouncing_alpha1 = 0.2; -float autocvar_cl_polytrails_crylink_bouncing_alpha2 = 0; -float autocvar_cl_polytrails_crylink_bouncing_thickness0 = 5; -float autocvar_cl_polytrails_crylink_bouncing_thickness1 = 3; -float autocvar_cl_polytrails_crylink_bouncing_thickness2 = 3; -float autocvar_cl_polytrails_crylink_bouncing_lifetime = 0.15; -float autocvar_cl_polytrails_crylink_bouncing_segmentsize = 80; -float autocvar_cl_polytrails_crylink_bouncing_noise = 0; -string autocvar_cl_polytrails_crylink_bouncing_noisefunc = "none"; - -bool autocvar_cl_polytrails_crylink_bolt = true; -vector autocvar_cl_polytrails_crylink_bolt_rgb0 = '0.7 0 1'; -vector autocvar_cl_polytrails_crylink_bolt_rgb1 = '0.5 0 1'; -vector autocvar_cl_polytrails_crylink_bolt_rgb2 = '0.1 0 0.8'; -float autocvar_cl_polytrails_crylink_bolt_alpha0 = 0.75; -float autocvar_cl_polytrails_crylink_bolt_alpha1 = 0.2; -float autocvar_cl_polytrails_crylink_bolt_alpha2 = 0; -float autocvar_cl_polytrails_crylink_bolt_thickness0 = 5; -float autocvar_cl_polytrails_crylink_bolt_thickness1 = 3; -float autocvar_cl_polytrails_crylink_bolt_thickness2 = 3; -float autocvar_cl_polytrails_crylink_bolt_lifetime = 0.15; -float autocvar_cl_polytrails_crylink_bolt_segmentsize = 80; -float autocvar_cl_polytrails_crylink_bolt_noise = 0; -string autocvar_cl_polytrails_crylink_bolt_noisefunc = "none"; - -bool autocvar_cl_polytrails_electro_bolt = true; -vector autocvar_cl_polytrails_electro_bolt_rgb0 = '0.75 0.75 1'; -vector autocvar_cl_polytrails_electro_bolt_rgb1 = '0.45 0.45 1'; -vector autocvar_cl_polytrails_electro_bolt_rgb2 = '0.1 0.1 0.75'; -float autocvar_cl_polytrails_electro_bolt_alpha0 = 1; -float autocvar_cl_polytrails_electro_bolt_alpha1 = 0.5; -float autocvar_cl_polytrails_electro_bolt_alpha2 = 0; -float autocvar_cl_polytrails_electro_bolt_thickness0 = 5; -float autocvar_cl_polytrails_electro_bolt_thickness1 = 5; -float autocvar_cl_polytrails_electro_bolt_thickness2 = 0; -float autocvar_cl_polytrails_electro_bolt_lifetime = 0.27; -float autocvar_cl_polytrails_electro_bolt_segmentsize = 10; -float autocvar_cl_polytrails_electro_bolt_noise = 5; -string autocvar_cl_polytrails_electro_bolt_noisefunc = "chaotic"; - -bool autocvar_cl_polytrails_electro_orb = true; -vector autocvar_cl_polytrails_electro_orb_rgb0 = '0.8 0.8 1'; -vector autocvar_cl_polytrails_electro_orb_rgb1 = '0.5 0.5 1'; -vector autocvar_cl_polytrails_electro_orb_rgb2 = '0.1 0.1 0.7'; -float autocvar_cl_polytrails_electro_orb_alpha0 = 1; -float autocvar_cl_polytrails_electro_orb_alpha1 = 0.5; -float autocvar_cl_polytrails_electro_orb_alpha2 = 0; -float autocvar_cl_polytrails_electro_orb_thickness0 = 15; -float autocvar_cl_polytrails_electro_orb_thickness1 = 7; -float autocvar_cl_polytrails_electro_orb_thickness2 = 0; -float autocvar_cl_polytrails_electro_orb_lifetime = 0.18; -float autocvar_cl_polytrails_electro_orb_segmentsize = 10; -float autocvar_cl_polytrails_electro_orb_noise = 10; -string autocvar_cl_polytrails_electro_orb_noisefunc = "chaotic"; - NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew) { // projectile properties: diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index b3cfd3e9b..9c7fa6c6e 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -31,3 +31,64 @@ void Projectile_Draw(entity this); void loopsound(entity e, int ch, Sound samp, float vol, float attn); void Ent_RemoveProjectile(entity this); + +// projectile polytrails +bool autocvar_cl_polytrails_crylink_bouncing = true; +vector autocvar_cl_polytrails_crylink_bouncing_rgb0 = '0.7 0 1'; +vector autocvar_cl_polytrails_crylink_bouncing_rgb1 = '0.5 0 1'; +vector autocvar_cl_polytrails_crylink_bouncing_rgb2 = '0.1 0 0.8'; +float autocvar_cl_polytrails_crylink_bouncing_alpha0 = 0.5; +float autocvar_cl_polytrails_crylink_bouncing_alpha1 = 0.2; +float autocvar_cl_polytrails_crylink_bouncing_alpha2 = 0; +float autocvar_cl_polytrails_crylink_bouncing_thickness0 = 5; +float autocvar_cl_polytrails_crylink_bouncing_thickness1 = 3; +float autocvar_cl_polytrails_crylink_bouncing_thickness2 = 3; +float autocvar_cl_polytrails_crylink_bouncing_lifetime = 0.15; +float autocvar_cl_polytrails_crylink_bouncing_segmentsize = 80; +float autocvar_cl_polytrails_crylink_bouncing_noise = 0; +string autocvar_cl_polytrails_crylink_bouncing_noisefunc = "none"; + +bool autocvar_cl_polytrails_crylink_bolt = true; +vector autocvar_cl_polytrails_crylink_bolt_rgb0 = '0.7 0 1'; +vector autocvar_cl_polytrails_crylink_bolt_rgb1 = '0.5 0 1'; +vector autocvar_cl_polytrails_crylink_bolt_rgb2 = '0.1 0 0.8'; +float autocvar_cl_polytrails_crylink_bolt_alpha0 = 0.75; +float autocvar_cl_polytrails_crylink_bolt_alpha1 = 0.2; +float autocvar_cl_polytrails_crylink_bolt_alpha2 = 0; +float autocvar_cl_polytrails_crylink_bolt_thickness0 = 5; +float autocvar_cl_polytrails_crylink_bolt_thickness1 = 3; +float autocvar_cl_polytrails_crylink_bolt_thickness2 = 3; +float autocvar_cl_polytrails_crylink_bolt_lifetime = 0.15; +float autocvar_cl_polytrails_crylink_bolt_segmentsize = 80; +float autocvar_cl_polytrails_crylink_bolt_noise = 0; +string autocvar_cl_polytrails_crylink_bolt_noisefunc = "none"; + +bool autocvar_cl_polytrails_electro_bolt = true; +vector autocvar_cl_polytrails_electro_bolt_rgb0 = '0.75 0.75 1'; +vector autocvar_cl_polytrails_electro_bolt_rgb1 = '0.45 0.45 1'; +vector autocvar_cl_polytrails_electro_bolt_rgb2 = '0.1 0.1 0.75'; +float autocvar_cl_polytrails_electro_bolt_alpha0 = 1; +float autocvar_cl_polytrails_electro_bolt_alpha1 = 0.5; +float autocvar_cl_polytrails_electro_bolt_alpha2 = 0; +float autocvar_cl_polytrails_electro_bolt_thickness0 = 5; +float autocvar_cl_polytrails_electro_bolt_thickness1 = 5; +float autocvar_cl_polytrails_electro_bolt_thickness2 = 0; +float autocvar_cl_polytrails_electro_bolt_lifetime = 0.27; +float autocvar_cl_polytrails_electro_bolt_segmentsize = 10; +float autocvar_cl_polytrails_electro_bolt_noise = 5; +string autocvar_cl_polytrails_electro_bolt_noisefunc = "chaotic"; + +bool autocvar_cl_polytrails_electro_orb = true; +vector autocvar_cl_polytrails_electro_orb_rgb0 = '0.8 0.8 1'; +vector autocvar_cl_polytrails_electro_orb_rgb1 = '0.5 0.5 1'; +vector autocvar_cl_polytrails_electro_orb_rgb2 = '0.1 0.1 0.7'; +float autocvar_cl_polytrails_electro_orb_alpha0 = 1; +float autocvar_cl_polytrails_electro_orb_alpha1 = 0.5; +float autocvar_cl_polytrails_electro_orb_alpha2 = 0; +float autocvar_cl_polytrails_electro_orb_thickness0 = 15; +float autocvar_cl_polytrails_electro_orb_thickness1 = 7; +float autocvar_cl_polytrails_electro_orb_thickness2 = 0; +float autocvar_cl_polytrails_electro_orb_lifetime = 0.18; +float autocvar_cl_polytrails_electro_orb_segmentsize = 10; +float autocvar_cl_polytrails_electro_orb_noise = 10; +string autocvar_cl_polytrails_electro_orb_noisefunc = "chaotic"; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 8cd277a9b..be6e183a2 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -914,6 +914,7 @@ exec effects-normal.cfg exec crosshairs.cfg exec gamemodes-client.cfg exec notifications.cfg +exec polytrails.cfg seta cl_physics "default" "client selected physics set" @@ -951,5 +952,3 @@ set menu_reverted_nonsaved_cvars "" "These cvars are currently marked as saved i // Avoid perf problems near '0 0 0'; `set` without a description is because only current DP has this engine cvar set cl_areagrid_link_SOLID_NOT 0 - -seta cl_polytrails 1 "enable polygon-based trail effect drawing (looks better but may impact performance)" -- 2.39.2