X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fgibs.qc;h=c617106019b0e0412881b00474ddbb86d8b89ee1;hb=cf4d36d9d295ce940e9e9bdf7a711e4036de0b3c;hp=afd61edab20461e3c61d67efcb0d819ccf4e6f89;hpb=49af10f3413b96e52055359d42288dbf5ec6972b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index afd61edab..c61710601 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -1,11 +1,24 @@ -.float silent; +#include "gibs.qh" +#include "_all.qh" + +#include "movetypes.qh" +#include "prandom.qh" +#include "rubble.qh" + +#include "../common/constants.qh" +#include "../common/util.qh" + +.float scale; +.float alpha; +.float cnt; +.float gravity; void Gib_Delete() { remove(self); } -string species_prefix(float specnum) +string species_prefix(int specnum) { switch(specnum) { @@ -20,7 +33,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 +61,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; @@ -109,7 +122,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,21 +164,22 @@ 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 - org_x = ReadShort() * 4 + 2; - org_y = ReadShort() * 4 + 2; - org_z = ReadShort() * 4 + 2; + org.x = ReadShort() * 4 + 2; + org.y = ReadShort() * 4 + 2; + org.z = ReadShort() * 4 + 2; vel = decompressShortVector(ReadShort()); float cl_gentle_gibs = autocvar_cl_gentle_gibs; @@ -176,7 +190,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 +199,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)