]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qh
Merge branch 'master' into Mario/weaponentities
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qh
index 7bc8675335958fef698d3c06692b63a0eb7edb86..81acde950eba2fc63cd450375f0bcebb9c1e7b16 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef COMMON_UTIL_H
-#define COMMON_UTIL_H
+#pragma once
 
 #ifndef MENUQC
+
 vector real_origin(entity ent);
 #endif
 
@@ -10,7 +10,7 @@ vector real_origin(entity ent);
 string wordwrap(string s, float l);
 #ifndef MENUQC
 #ifndef CSQC
-void wordwrap_sprint(string s, float l);
+void wordwrap_sprint(entity to, string s, float l);
 #endif
 #endif
 void wordwrap_cb(string s, float l, void(string) callback);
@@ -27,8 +27,8 @@ void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(
 float median(float a, float b, float c);
 
 // converts a number to a string with the indicated number of decimals
-// works for up to 10 decimals!
 string ftos_decimals(float number, float decimals);
+string ftos_mindecimals(float number);
 
 bool fexists(string f);
 
@@ -63,7 +63,6 @@ const float TIME_FACTOR = 100;
 
 string ScoreString(float vflags, float value);
 
-void compressShortVector_init();
 vector decompressShortVector(float data);
 float compressShortVector(vector vec);
 
@@ -125,7 +124,7 @@ string getWrappedLine_remaining;
 string getWrappedLine(float w, vector size, textLengthUpToWidth_widthFunction_t tw);
 string getWrappedLineLen(float w, textLengthUpToLength_lenFunction_t tw);
 
-float isGametypeInFilter(float gt, float tp, float ts, string pattern);
+float isGametypeInFilter(entity gt, float tp, float ts, string pattern);
 
 string swapwords(string str, float i, float j);
 string shufflewords(string str);
@@ -273,10 +272,6 @@ string CCR(string input);
 vector animfixfps(entity e, vector a, vector b);
 #endif
 
-#ifdef SVQC
-void dedicated_print(string input);
-#endif
-
 #ifndef MENUQC
 const float CNT_NORMAL = 1;
 const float CNT_GAMESTART = 2;
@@ -300,4 +295,3 @@ 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