From: havoc Date: Sun, 7 Dec 2003 10:57:29 +0000 (+0000) Subject: todo item done: added cl_particles_blood_bloodhack cvar so now id1 blood particles... X-Git-Tag: xonotic-v0.1.0preview~6230 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79034d99c05d8cbfda384245f22affcf032ef558;p=xonotic%2Fdarkplaces.git todo item done: added cl_particles_blood_bloodhack cvar so now id1 blood particles use the blood effect, and added this to effects options menu as Force New Blood Effect git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3700 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_particles.c b/cl_particles.c index 7d24c80e..ebe3258b 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -284,6 +284,7 @@ cvar_t cl_particles_size = {CVAR_SAVE, "cl_particles_size", "1"}; cvar_t cl_particles_bloodshowers = {CVAR_SAVE, "cl_particles_bloodshowers", "1"}; cvar_t cl_particles_blood = {CVAR_SAVE, "cl_particles_blood", "1"}; cvar_t cl_particles_blood_alpha = {CVAR_SAVE, "cl_particles_blood_alpha", "0.5"}; +cvar_t cl_particles_blood_bloodhack = {CVAR_SAVE, "cl_particles_blood_bloodhack", "1"}; cvar_t cl_particles_bulletimpacts = {CVAR_SAVE, "cl_particles_bulletimpacts", "1"}; cvar_t cl_particles_smoke = {CVAR_SAVE, "cl_particles_smoke", "1"}; cvar_t cl_particles_smoke_alpha = {CVAR_SAVE, "cl_particles_smoke_alpha", "0.5"}; @@ -332,6 +333,7 @@ void CL_Particles_Init (void) Cvar_RegisterVariable (&cl_particles_bloodshowers); Cvar_RegisterVariable (&cl_particles_blood); Cvar_RegisterVariable (&cl_particles_blood_alpha); + Cvar_RegisterVariable (&cl_particles_blood_bloodhack); Cvar_RegisterVariable (&cl_particles_bulletimpacts); Cvar_RegisterVariable (&cl_particles_smoke); Cvar_RegisterVariable (&cl_particles_smoke_alpha); @@ -587,6 +589,21 @@ void CL_ParseParticleEffect (void) else count = msgcount; + if (cl_particles_blood_bloodhack.integer) + { + if (color == 73) + { + // regular blood + CL_BloodPuff(org, dir, count / 2); + return; + } + if (color == 225) + { + // lightning blood + CL_BloodPuff(org, dir, count / 2); + return; + } + } CL_RunParticleEffect (org, dir, color, count); } @@ -779,7 +796,7 @@ void CL_BloodPuff (vec3_t org, vec3_t vel, int count) if (!cl_particles.integer) return; if (!cl_particles_blood.integer) return; - s = count + 32.0f; + s = count + 64.0f; count *= 5.0f; if (count > 1000) count = 1000; diff --git a/menu.c b/menu.c index fae2bb18..6b7e46f3 100644 --- a/menu.c +++ b/menu.c @@ -1362,7 +1362,7 @@ void M_Options_Key (int k, char ascii) } } -#define OPTIONS_EFFECTS_ITEMS 21 +#define OPTIONS_EFFECTS_ITEMS 22 int options_effects_cursor; @@ -1390,6 +1390,7 @@ extern cvar_t cl_particles_sparks; extern cvar_t cl_particles_bubbles; extern cvar_t cl_particles_blood; extern cvar_t cl_particles_blood_alpha; +extern cvar_t cl_particles_blood_bloodhack; void M_Menu_Options_Effects_AdjustSliders (int dir) { @@ -1429,6 +1430,8 @@ void M_Menu_Options_Effects_AdjustSliders (int dir) Cvar_SetValueQuick (&cl_particles_blood, !cl_particles_blood.integer); else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_blood_alpha, bound(0.2, cl_particles_blood_alpha.value + dir * 0.1, 1)); + else if (options_effects_cursor == optnum++) + Cvar_SetValueQuick (&cl_particles_blood_bloodhack, !cl_particles_blood_bloodhack.integer); else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lerpmodels, !r_lerpmodels.integer); else if (options_effects_cursor == optnum++) @@ -1473,6 +1476,7 @@ void M_Options_Effects_Draw (void) M_Options_PrintCheckbox(" Bubbles", true, cl_particles_bubbles.integer); M_Options_PrintCheckbox(" Blood", true, cl_particles_blood.integer); M_Options_PrintSlider( " Blood Opacity", true, cl_particles_blood_alpha.value, 0.2, 1); + M_Options_PrintCheckbox("Force New Blood Effect", true, cl_particles_blood_bloodhack.integer); M_Options_PrintCheckbox(" Model Interpolation", true, r_lerpmodels.integer); M_Options_PrintCheckbox(" Sprite Interpolation", true, r_lerpsprites.integer); M_Options_PrintSlider( " Water Alpha (opacity)", true, r_wateralpha.value, 0, 1); diff --git a/todo b/todo index 39d85f7e..d1b0d40a 100644 --- a/todo +++ b/todo @@ -51,8 +51,8 @@ d darkplaces: add DP_LITSUPPORT extension and document it 0 darkplaces: add ability to load gfx/particlefont.tga (Vermeulen, frightfan, Error) 0 darkplaces: add automatic binding to whatever address the machine's hostname resolves to (in addition to 0.0.0.0); see original quake code for examples (yummyluv) 0 darkplaces: add chase_pitch cvar to control pitch angle of chase camera, and chase_angle cvar to control yaw angle of chase camera, and add back chase_right cvar (Electro) -0 darkplaces: add cl_particles_particleffect_bloodhack cvar to enable converting id1 blood effects to TE_BLOOD style (Alex Boveri) -0 darkplaces: add cl_particles_particleffect_bloodhack cvar to menu (Alex Boveri) +-n darkplaces: add cl_particles_particleffect_bloodhack cvar to enable converting id1 blood effects to TE_BLOOD style (Alex Boveri) +-n darkplaces: add cl_particles_particleffect_bloodhack cvar to menu (Alex Boveri) 0 darkplaces: add cvars for sbar alpha (background and foreground) (Throvold@uboot.com) 0 darkplaces: add cvars to control lighting quality to allow performance tradeoffs 0 darkplaces: add graphics options menu and put realtime lighting stuff in it (Antti)