X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fgibs.qc;h=2d8f48b1a7db5f75517771979f728adea19ef630;hb=d3a7bb2616410f0252504af2a84e11fb4dac21a3;hp=9e1c6e7a1395faf93d89ca7234aad0d031bdbbf2;hpb=db7073760c3dbc7726f7f946aa108120d7a7100a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 9e1c6e7a1..2d8f48b1a 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -1,11 +1,11 @@ -.float silent; +#include "gibs.qh" void Gib_Delete() { remove(self); } -string species_prefix(float specnum) +string species_prefix(int specnum) { switch(specnum) { @@ -20,7 +20,7 @@ string species_prefix(float specnum) } } -void Gib_setmodel(entity gib, string mdlname, float specnum) +void Gib_setmodel(entity gib, string mdlname, int specnum) { switch(specnum) { @@ -48,7 +48,7 @@ void Gib_setmodel(entity gib, string mdlname, float specnum) } } -void new_te_bloodshower (float ef, vector org, float explosionspeed, float howmany) +void new_te_bloodshower (int ef, vector org, float explosionspeed, int howmany) { float i, pmod; pmod = autocvar_cl_particles_quality; @@ -73,7 +73,7 @@ void Gib_Touch() } if(!self.silent) - sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM); + sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTEN_NORM); pointparticles(particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10); Gib_Delete(); @@ -109,7 +109,7 @@ void Gib_Draw() } } -void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent) +void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, int specnum, bool destroyontouch, bool issilent) { entity gib; @@ -151,15 +151,16 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector RubbleLimit("gib", autocvar_cl_gibs_maxcount, Gib_Delete); } -void Ent_GibSplash(float isNew) +void Ent_GibSplash(bool isNew) { - float amount, type, specnum; + int amount, type, specnum; vector org, vel; string specstr; - float issilent; + bool issilent; string gentle_prefix = "morphed_"; - float c, randomvalue; + float randomvalue; + int c; type = ReadByte(); // gibbage type amount = ReadByte() / 16.0; // gibbage amount @@ -176,7 +177,7 @@ void Ent_GibSplash(float isNew) { if(cl_gentle_gibs == 2) gentle_prefix = ""; - else if(cl_gentle_gibs == 3) + else if(cl_gentle_gibs == 3) gentle_prefix = "happy_"; } else if(autocvar_cl_particlegibs) @@ -185,7 +186,7 @@ void Ent_GibSplash(float isNew) gentle_prefix = "particlegibs_"; } - if not(cl_gentle_gibs || autocvar_cl_gentle) + if (!(cl_gentle_gibs || autocvar_cl_gentle)) amount *= 1 - autocvar_cl_nogibs; if(autocvar_ekg) @@ -205,7 +206,7 @@ void Ent_GibSplash(float isNew) { case 0x01: if(!issilent) - sound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM); + sound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTEN_NORM); if(prandom() < amount) TossGib ("models/gibs/eye.md3", org, org, vel, prandomvec() * 150, specnum, 0, issilent);