return strcat(substring(theText, 0, textLengthUpToLength(theText, maxWidth - tw("..."), tw)), "...");
}
-float isGametypeInFilter(float gt, float tp, string pattern)
+float isGametypeInFilter(float gt, float tp, float ts, string pattern)
{
- string subpattern, subpattern2, subpattern3;
+ string subpattern, subpattern2, subpattern3, subpattern4;
subpattern = strcat(",", GametypeNameFromType(gt), ",");
if(tp)
subpattern2 = ",teams,";
else
subpattern2 = ",noteams,";
+ if(ts)
+ subpattern3 = ",teamspawns,";
+ else
+ subpattern3 = ",noteamspawns,";
if(gt == GAME_RACE || gt == GAME_CTS)
- subpattern3 = ",race,";
+ subpattern4 = ",race,";
else
- subpattern3 = string_null;
+ subpattern4 = string_null;
if(substring(pattern, 0, 1) == "-")
{
return 0;
if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) >= 0)
return 0;
- if(subpattern3 && strstrofs(strcat(",", pattern, ","), subpattern3, 0) >= 0)
+ if(strstrofs(strcat(",", pattern, ","), subpattern3, 0) >= 0)
+ return 0;
+ if(subpattern4 && strstrofs(strcat(",", pattern, ","), subpattern4, 0) >= 0)
return 0;
}
else
pattern = substring(pattern, 1, strlen(pattern) - 1);
if(strstrofs(strcat(",", pattern, ","), subpattern, 0) < 0)
if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) < 0)
- if((!subpattern3) || strstrofs(strcat(",", pattern, ","), subpattern3, 0) < 0)
+ if(strstrofs(strcat(",", pattern, ","), subpattern3, 0) < 0)
+ if((!subpattern4) || strstrofs(strcat(",", pattern, ","), subpattern4, 0) < 0)
return 0;
}
return 1;
string getWrappedLine(float w, vector size, textLengthUpToWidth_widthFunction_t tw);
string getWrappedLineLen(float w, textLengthUpToLength_lenFunction_t tw);
-float isGametypeInFilter(float gt, float tp, string pattern);
+float isGametypeInFilter(float gt, float tp, float ts, string pattern);
typedef void(float i1, float i2, entity pass) swapfunc_t; // is only ever called for i1 < i2
typedef float(float i1, float i2, entity pass) comparefunc_t; // <0 for <, ==0 for ==, >0 for > (like strcmp)