]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/gibs.qc
Fix compile.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / gibs.qc
index 22825bc4f38d4912b70c51922098c20213308581..835d14a1ee6f3b6d9336ae96ffdbef27ac6c6cc6 100644 (file)
@@ -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();
@@ -138,7 +138,8 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector
                org = trace_endpos;
        }
 
-       gib.move_origin = gib.origin = org;
+       gib.move_origin = org;
+       setorigin(gib, 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) * autocvar_cl_gibs_avelocity_scale;
        gib.move_time = time;
@@ -156,7 +157,7 @@ void Ent_GibSplash(float isNew)
        vector org, vel;
        string specstr;
        float issilent;
-       string gentle_prefix;
+       string gentle_prefix = "morphed_";
 
        float c, randomvalue;
 
@@ -175,10 +176,8 @@ 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
-                       gentle_prefix = "morphed_";
        }
        else if(autocvar_cl_particlegibs)
        {
@@ -186,7 +185,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)
@@ -195,7 +194,7 @@ void Ent_GibSplash(float isNew)
        if(amount <= 0 || !isNew)
                return;
 
-       self.origin = org; // for the sounds
+       setorigin(self, org); // for the sounds
 
        specnum = (type & 0x78) / 8; // blood/gibmodel type: using four bits (0..7, bit indexes 3,4,5)
        issilent = (type & 0x40);
@@ -206,7 +205,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);