]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/casings.qc
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / casings.qc
index 2225c0f35260d6ac88320cc2027939d4ba5d528e..020781470686487df7b2fa31d942b1ba7ccfe4df 100644 (file)
@@ -1,4 +1,19 @@
-.float silent;
+#if defined(CSQC)
+       #include "../dpdefs/csprogsdefs.qc"
+       #include "Defs.qc"
+       #include "../common/constants.qh"
+       #include "../common/util.qh"
+       #include "autocvars.qh"
+       #include "movetypes.qh"
+       #include "prandom.qh"
+       #include "main.qh"
+       #include "../csqcmodellib/cl_model.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+#endif
+
+
+.bool silent;
 
 void Casing_Delete()
 {
@@ -44,16 +59,15 @@ void Casing_Touch()
                        if(time >= self.nextthink)
                        {
                                string s;
-                               float f;
+                               int f = floor(prandom() * 3) + 1;
 
-                               f = floor(prandom() * 3) + 1;
                                switch(self.state)
                                {
                                        case 1:
-                                               s = strcat("weapons/casings", ftos(f), ".wav");
+                                               s = strcat("weapons/casings", itos(f), ".wav");
                                                break;
                                        default:
-                                               s = strcat("weapons/brass", ftos(f), ".wav");
+                                               s = strcat("weapons/brass", itos(f), ".wav");
                                                break;
                                }
 
@@ -65,9 +79,9 @@ void Casing_Touch()
        self.nextthink = time + 0.2;
 }
 
-void Casing_Damage(float thisdmg, float hittype, vector org, vector thisforce)
+void Casing_Damage(float thisdmg, int hittype, vector org, vector thisforce)
 {
-       if(thisforce_z < 0)
+       if(thisforce.z < 0)
                thisforce_z = 0;
        self.move_velocity = self.move_velocity + thisforce + '0 0 100';
        self.move_flags &= ~FL_ONGROUND;