seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
seta cl_gibs_ticrate 0.1 "ticrate for gibs"
seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
+seta cl_gibs_avelocity_scale 1 "how much angular velocity to use on gibs"
seta cl_casings 1 "enable or disable bullet casings"
seta cl_casings_shell_time 30 "shell casing lifetime"
seta cl_casings_bronze_time 10 "bullet casings lifetime"
float a;
hud = getstati(STAT_HUD);
+ if(checkextension("DP_CSQC_MINFPS_QUALITY"))
+ view_quality = R_SetView(VF_MINFPS_QUALITY);
+ else
+ view_quality = 1;
+
button_attack2 = (input_buttons & BUTTON_3);
button_zoom = (input_buttons & BUTTON_4);
var float autocvar_cl_gibs_ticrate = 0.1;
var float autocvar_cl_gibs_velocity_random = 1;
var float autocvar_cl_gibs_velocity_scale = 1;
+var float autocvar_cl_gibs_avelocity_scale = 1;
float autocvar_cl_gibs_velocity_up;
float autocvar_cl_gunalign;
float autocvar_cl_hidewaypoints;
//only the "MD4" digest is always supported!
//if the given digest is not supported, string_null is returned
//the digest string is matched case sensitively, use "MD4", not "md4"!
+
+//DP_CSQC_MINFPS_QUALITY
+//idea: divVerent
+//darkplaces implementation: divVerent
+//constant definitions:
+const float VF_MINFPS_QUALITY = 213;
+//use getproperty(VF_MINFPS_QUALITY); to do CSQC based LOD based on cl_minfps
+//1 should lead to an unmodified view
trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_BLOOD")), oldorg, self.origin);
self.renderflags = 0;
+
+ // make gibs die faster at low view quality
+ // if view_quality is 0.5, we want to have them die twice as fast
+ self.nextthink -= frametime * (1 / bound(0.01, view_quality, 1.00) - 1);
+
self.alpha = bound(0, self.nextthink - time, 1);
if(self.alpha < ALPHA_MIN_VISIBLE)
gib.move_origin = gib.origin = org;
gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
- gib.move_avelocity = prandomvec() * vlen(gib.move_velocity);
+ gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_gl_gibs_avelocity_scale;
gib.move_time = time;
gib.damageforcescale = autocvar_cl_gibs_damageforcescale;
entity entcs_receiver[255]; // 255 is the engine limit on maxclients
float hud;
+float view_quality;
void cvar_clientsettemp(string cv, string val);