From: Mircea Kitsune Date: Mon, 4 Apr 2011 12:47:27 +0000 (+0300) Subject: Reduce effect probability on gibs each tick. Helps a lot with performance, and reduce... X-Git-Tag: xonotic-v0.6.0~110^2^2~132 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=20015a9462fdd6e2c29398e6973d6c311b084949;p=xonotic%2Fxonotic-data.pk3dir.git Reduce effect probability on gibs each tick. Helps a lot with performance, and reduces the effect to a sane visual amount as well. --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 27020a5e6..fa262cbb9 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -352,6 +352,7 @@ set g_teleport_maxspeed 0 "maximum speed that a player can keep when going throu set sv_damageeffect_tick 0.05 "how often the damage effect is updated (particles per second), low values might cause lag" set sv_damageeffect_lifetime 0.1 "how much a damage effect lasts, multiplied by damage amount" set cl_damageeffect 1 "enable weapon damage effects on players" +set cl_damageeffect_gib_probability 0.15 "probability of effect showing on gibs each tick (used to reduce the effect on gibs)" set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns" set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index ec1581973..81feea23e 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -306,3 +306,4 @@ float autocvar_crosshair_color_by_health; float autocvar_cl_hitsound; float autocvar_cl_hitsound_antispam_time; float autocvar_cl_damageeffect; +float autocvar_cl_damageeffect_gib_probability; diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 65c6468aa..61f6e9629 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -323,6 +323,7 @@ void Ent_DamageEffect() for(head = world; (head = find(head, classname, "gib")); ) { if(head.team == entnumber) + if(random() < autocvar_cl_damageeffect_gib_probability) { pointparticles(particleeffectnum(effectnum), head.origin, '0 0 0', 1); foundgib = TRUE;