r2888 - in trunk/data: . qcsrc/common qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Nov 2 05:23:52 EDT 2007
Author: div0
Date: 2007-11-02 05:23:52 -0400 (Fri, 02 Nov 2007)
New Revision: 2888
Modified:
trunk/data/high.cfg
trunk/data/low.cfg
trunk/data/med.cfg
trunk/data/normal.cfg
trunk/data/omg.cfg
trunk/data/qcsrc/common/util.qc
trunk/data/qcsrc/common/util.qh
trunk/data/qcsrc/server/miscfunctions.qc
trunk/data/ultimate.cfg
trunk/data/ultra.cfg
Log:
Nothing sets flashblend, so remove it.
Add missing files from previous commit.
Modified: trunk/data/high.cfg
===================================================================
--- trunk/data/high.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/high.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 16
r_bloom 1
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 1
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
Modified: trunk/data/low.cfg
===================================================================
--- trunk/data/low.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/low.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 1
r_bloom 0
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 0
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
Modified: trunk/data/med.cfg
===================================================================
--- trunk/data/med.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/med.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 1
r_bloom 0
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 0
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
Modified: trunk/data/normal.cfg
===================================================================
--- trunk/data/normal.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/normal.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 1
r_bloom 0
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 1
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
Modified: trunk/data/omg.cfg
===================================================================
--- trunk/data/omg.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/omg.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -2,12 +2,11 @@
cl_nogibs 0
cl_particles_quality 0.20
cl_particles_snow 0
-gl_picmip 10
+gl_picmip 1337
r_picmipworld 1
gl_texture_anisotropy 1
r_bloom 0
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 0
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
Modified: trunk/data/qcsrc/common/util.qc
===================================================================
--- trunk/data/qcsrc/common/util.qc 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/qcsrc/common/util.qc 2007-11-02 09:23:52 UTC (rev 2888)
@@ -137,3 +137,46 @@
return bound(a, b, c);
return bound(c, b, a);
}
+
+// 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 result;
+ string tmp;
+ float len;
+
+ // if negative, cut off the sign first
+ if(number < 0)
+ return strcat("-", ftos_decimals(-number, decimals));
+ // it now is always positive!
+
+ // 3.516 -> 352
+ number = floor(number * pow(10, decimals) + 0.5);
+
+ // 352 -> "352"
+ result = ftos(number);
+ len = strlen(result);
+ // does it have a decimal point (should not happen)? If there is one, it is always at len-7)
+ // if ftos had fucked it up, which should never happen: "34278.000000"
+ if(len >= 7)
+ if(substring(result, len - 7, 1) == ".")
+ {
+ dprint("ftos(integer) has comma? Can't be. Affected result: ", result, "\n");
+ result = substring(result, 0, len - 7);
+ len -= 7;
+ }
+ // "34278"
+ if(decimals == 0)
+ return result; // don't insert a point for zero decimals
+ // is it too short? If yes, insert leading zeroes
+ if(len <= decimals)
+ {
+ result = strcat(substring("0000000000", 0, decimals - len + 1), result);
+ len = decimals + 1;
+ }
+ // and now... INSERT THE POINT!
+ tmp = substring(result, len - decimals, decimals);
+ result = strcat(substring(result, 0, len - decimals), ".", tmp);
+ return result;
+}
Modified: trunk/data/qcsrc/common/util.qh
===================================================================
--- trunk/data/qcsrc/common/util.qh 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/qcsrc/common/util.qh 2007-11-02 09:23:52 UTC (rev 2888)
@@ -26,3 +26,7 @@
void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
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);
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2007-11-02 09:23:52 UTC (rev 2888)
@@ -77,47 +77,6 @@
}
}
-// 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 result;
- string tmp;
- float len;
-
- // if negative, cut off the sign first
- if(number < 0)
- return strcat("-", ftos_decimals(-number, decimals));
- // it now is always positive!
-
- // 3.516 -> 352
- number = floor(number * pow(10, decimals) + 0.5);
-
- // 352 -> "352"
- result = ftos(number);
- len = strlen(result);
- // does it have a decimal point (should not happen)? If there is one, it is always at len-7)
- // if ftos had fucked it up, which should never happen: "34278.000000"
- if(len >= 7)
- if(substring(result, len - 7, 1) == ".")
- {
- dprint("ftos(integer) has comma? Can't be. Affected result: ", result, "\n");
- result = substring(result, 0, len - 7);
- len -= 7;
- }
- // "34278"
- // is it too short? If yes, insert leading zeroes
- if(len <= decimals)
- {
- result = strcat(substring("0000000000", 0, decimals - len + 1), result);
- len = decimals + 1;
- }
- // and now... INSERT THE POINT!
- tmp = substring(result, len - decimals, decimals);
- result = strcat(substring(result, 0, len - decimals), ".", tmp);
- return result;
-}
-
#define FOR_EACH_CLIENT(v) for(v = world; (v = findflags(v, flags, FL_CLIENT)) != world; )
#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(clienttype(v) == CLIENTTYPE_REAL)
string STR_PLAYER = "player";
Modified: trunk/data/ultimate.cfg
===================================================================
--- trunk/data/ultimate.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/ultimate.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 16
r_bloom 1
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 1
r_glsl_offsetmapping 1
r_glsl_offsetmapping_reliefmapping 1
Modified: trunk/data/ultra.cfg
===================================================================
--- trunk/data/ultra.cfg 2007-11-02 09:23:10 UTC (rev 2887)
+++ trunk/data/ultra.cfg 2007-11-02 09:23:52 UTC (rev 2888)
@@ -7,7 +7,6 @@
gl_texture_anisotropy 16
r_bloom 1
r_coronas 1
-gl_flashblend 0
r_glsl_deluxemapping 1
r_glsl_offsetmapping 1
r_glsl_offsetmapping_reliefmapping 0
More information about the nexuiz-commits
mailing list