queue_start.FindConnectedComponent_processing = 0;
}
+float Count_Proper_Strings(string improper, string...count)
+{
+ float i, total = 0;
+ string tmp;
+
+ for(i = 0; i < count; ++i)
+ {
+ tmp = ...(i, string);
+ if((tmp) && (tmp != improper)) { ++total; }
+ }
+
+ return total;
+}
+
+float Count_Proper_Floats(float improper, float...count)
+{
+ float i, total = 0;
+
+ for(i = 0; i < count; ++i)
+ {
+ if(...(i, float) != improper) { ++total; }
+ }
+
+ return total;
+}
+
+// todo: this sucks, lets find a better way to do backtraces?
+#ifndef MENUQC
+void backtrace(string msg)
+{
+ float dev, war;
+ #ifdef SVQC
+ dev = autocvar_developer;
+ war = autocvar_prvm_backtraceforwarnings;
+ #else
+ dev = cvar("developer");
+ war = cvar("prvm_backtraceforwarnings");
+ #endif
+ cvar_set("developer", "1");
+ cvar_set("prvm_backtraceforwarnings", "1");
+ print("\n");
+ print("--- CUT HERE ---\nWARNING: ");
+ print(msg);
+ print("\n");
+ remove(world); // isn't there any better way to cause a backtrace?
+ print("\n--- CUT UNTIL HERE ---\n");
+ cvar_set("developer", ftos(dev));
+ cvar_set("prvm_backtraceforwarnings", ftos(war));
+}
+#endif
+
+// color code replace, place inside of sprintf and parse the string
+string CCR(string input)
+{
+ // See the autocvar declarations in util.qh for default values
+
+ // foreground/normal colors
+ input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input);
+ input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input);
+ input = strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), input);
+ input = strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), input);
+
+ // "kill" colors
+ input = strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), input);
+ input = strreplace("^K2", strcat("^", autocvar_hud_colorset_kill_2), input);
+ input = strreplace("^K3", strcat("^", autocvar_hud_colorset_kill_3), input);
+
+ // background colors
+ input = strreplace("^BG", strcat("^", autocvar_hud_colorset_background), input);
+ input = strreplace("^N", "^7", input); // "none"-- reset to white...
+ return input;
+}
+
vector vec3(float x, float y, float z)
{
vector v;