]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qh
Simplify headers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qh
index efe6d30ec2070e78590f9889cc06e29ca2123716..2e41ce76ca796a1868b06085ff6dc197e06e7c86 100644 (file)
@@ -1,45 +1,6 @@
 #ifndef COMMON_UTIL_H
 #define COMMON_UTIL_H
 
-#if defined(CSQC)
-       #include "util-pre.qh"
-    #include "../client/sys-pre.qh"
-    #include "../dpdefs/csprogsdefs.qc"
-    #include "../client/sys-post.qh"
-    #include "../client/Defs.qc"
-    #include "../dpdefs/keycodes.qc"
-    #include "constants.qh"
-    #include "stats.qh"
-    #include "../warpzonelib/anglestransform.qh"
-    #include "../warpzonelib/mathlib.qh"
-    #include "../warpzonelib/common.qh"
-    #include "../warpzonelib/client.qh"
-    #include "playerstats.qh"
-    #include "teams.qh"
-#elif defined(MENUQC)
-       #include "util-pre.qh"
-    #include "../menu/sys-pre.qh"
-    #include "../dpdefs/menudefs.qc"
-    #include "../dpdefs/keycodes.qc"
-    #include "../menu/sys-post.qh"
-    #include "../menu/config.qh"
-    #include "../warpzonelib/mathlib.qh"
-#elif defined(SVQC)
-       #include "util-pre.qh"
-    #include "../server/sys-pre.qh"
-    #include "../dpdefs/progsdefs.qc"
-    #include "../dpdefs/dpextensions.qc"
-    #include "../server/sys-post.qh"
-    #include "../warpzonelib/anglestransform.qh"
-    #include "../warpzonelib/mathlib.qh"
-    #include "../warpzonelib/common.qh"
-    #include "../warpzonelib/util_server.qh"
-    #include "../warpzonelib/server.qh"
-    #include "constants.qh"
-    #include "stats.qh"
-    #include "teams.qh"
-#endif
-
 #ifdef QCC_SUPPORT_ACCUMULATE
 # define ACCUMULATE_FUNCTION(func,otherfunc) \
        [[accumulate]] void func() { otherfunc(); }
@@ -148,9 +109,6 @@ const float TIME_FACTOR = 100;
 
 string ScoreString(float vflags, float value);
 
-float dotproduct(vector a, vector b);
-vector cross(vector a, vector b);
-
 void compressShortVector_init();
 vector decompressShortVector(float data);
 float compressShortVector(vector vec);
@@ -256,8 +214,8 @@ void RandomSelection_Init();
 void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
 
 #ifndef MENUQC
-vector healtharmor_maxdamage(float h, float a, float armorblock, float deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
-vector healtharmor_applydamage(float a, float armorblock, float deathtype, float damage); // returns vector: take, save, 0
+vector healtharmor_maxdamage(float h, float a, float armorblock, int deathtype); // returns vector: maxdamage, armorideal, 1 if fully armored
+vector healtharmor_applydamage(float a, float armorblock, int deathtype, float damage); // returns vector: take, save, 0
 #endif
 
 string getcurrentmod();
@@ -338,7 +296,7 @@ float xdecode(string s);
 // Otherwise, channels 8 to 15 would be blocked for a weird QW feature.
 #define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
 
-float lowestbit(float f);
+int lowestbit(float f);
 
 #ifdef CSQC
 entity ReadCSQCEntity();
@@ -427,12 +385,12 @@ string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimport
 string CCR(string input);
 
 #ifndef MENUQC
-#ifdef CSQC
-#define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
-#else
-#define GENTLE autocvar_sv_gentle
-#endif
-#define normal_or_gentle(normal,gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
+       #ifdef CSQC
+               #define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
+       #else
+               #define GENTLE autocvar_sv_gentle
+       #endif
+       #define normal_or_gentle(normal, gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
 #endif
 
 // allow writing to also pass through to spectators (like so spectators see the same centerprints as players for example)
@@ -484,4 +442,4 @@ vector bezier_quadratic_getderivative(vector a, vector p, vector b, float t);
 
 // Returns the correct difference between two always increasing numbers
 #define COMPARE_INCREASING(to,from) (to < from ? from + to + 2 : to - from)
-#endif
\ No newline at end of file
+#endif