X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fgibs.qc;h=1f8af46ca16c4178284485bfa93626b416506968;hb=6cb8d7d5e0961e49e4b6725b5ce31b161687bea0;hp=a92567e61928f90ff8f4c74916430234f4768f3d;hpb=715202f719f244160bfc0b004013fa6e1bcc5668;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index a92567e61..1f8af46ca 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -51,7 +51,7 @@ void Gib_setmodel(entity gib, string mdlname, float specnum) void new_te_bloodshower (float ef, vector org, float explosionspeed, float howmany) { float i, pmod; - pmod = cvar("cl_particles_quality"); + pmod = autocvar_cl_particles_quality; for (i = 0; i < 250 * pmod; ++i) pointparticles(ef, org, randomvec() * explosionspeed, howmany / 250); } @@ -97,9 +97,10 @@ void Gib_Draw() self.alpha = bound(0, self.nextthink - time, 1); if(self.alpha < ALPHA_MIN_VISIBLE) + { + self.drawmask = 0; Gib_Delete(); - else - R_AddEntity(self); + } } void TossGib (string mdlname, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent) @@ -124,14 +125,15 @@ void TossGib (string mdlname, vector org, vector vconst, vector vrand, float spe gib.move_touch = SUB_RemoveOnNoImpact; gib.move_origin = gib.origin = org; - gib.move_velocity = vconst * cvar_or("cl_gibs_velocity_scale", 1) + vrand * cvar_or("cl_gibs_velocity_random", 1) + '0 0 1' * cvar("cl_gibs_velocity_up"); + 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_time = time; - gib.damageforcescale = cvar_or("cl_gibs_damageforcescale", 3.5); + gib.damageforcescale = autocvar_cl_gibs_damageforcescale; - gib.nextthink = time + cvar_or("cl_gibs_lifetime", 14) * (1 + prandom() * 0.15); + gib.nextthink = time + autocvar_cl_gibs_lifetime * (1 + prandom() * 0.15); + gib.drawmask = MASK_NORMAL; - RubbleLimit("gib", cvar_or("cl_gibs_maxcount",100), Gib_Delete); + RubbleLimit("gib", autocvar_cl_gibs_maxcount, Gib_Delete); } void Ent_GibSplash(float isNew) @@ -151,28 +153,29 @@ void Ent_GibSplash(float isNew) org_z = ReadShort() * 4 + 2; vel = decompressShortVector(ReadShort()); - if(cvar("cl_gentle")) + float cl_gentle_gibs = autocvar_cl_gentle_gibs; + if(cl_gentle_gibs || autocvar_cl_gentle) type |= 0x80; // set gentle bit if(type & 0x80) { - if(cvar("cl_gentle") == 2) + if(cl_gentle_gibs == 2) gentle_prefix = ""; - else if(cvar("cl_gentle") == 3) + else if(cl_gentle_gibs == 3) gentle_prefix = "happy_"; - else if(cvar("cl_gentle")) + else gentle_prefix = "morphed_"; } - else if(cvar("cl_particlegibs")) + else if(autocvar_cl_particlegibs) { type |= 0x80; gentle_prefix = "particlegibs_"; } - if not(cvar("cl_gentle")) - amount *= 1 - cvar("cl_nogibs"); + if not(cl_gentle_gibs || autocvar_cl_gentle) + amount *= 1 - autocvar_cl_nogibs; - if(cvar("ekg")) + if(autocvar_ekg) amount *= 5; if(amount <= 0 || !isNew)