- if(
- (freeslots >= autocvar_menu_slist_recommendations_minfreeslots)
- &&
- (
- (autocvar_menu_slist_recommendations_purethreshold < 0)
- ||
- (impure <= autocvar_menu_slist_recommendations_purethreshold)
- )
- &&
- (
- gethostcachenumber(SLIST_FIELD_NUMHUMANS, entry)
- >=
- autocvar_menu_slist_recommendations_minhumans
- )
- &&
- (
- gethostcachenumber(SLIST_FIELD_PING, entry)
- <=
- autocvar_menu_slist_recommendations_maxping
+ float recommended = 0;
+ if(autocvar_menu_slist_recommendations & 1)
+ {
+ if(IsRecommended(cname)) { ++recommended; }
+ else { --recommended; }
+ }
+ if(autocvar_menu_slist_recommendations & 2)
+ {
+ if(
+ ///// check for minimum free slots
+ (freeslots >= autocvar_menu_slist_recommendations_minfreeslots)
+
+ && // check for purity requirement
+ (
+ (autocvar_menu_slist_recommendations_purethreshold < 0)
+ ||
+ (impure <= autocvar_menu_slist_recommendations_purethreshold)
+ )
+
+ && // check for minimum amount of humans
+ (
+ gethostcachenumber(SLIST_FIELD_NUMHUMANS, entry)
+ >=
+ autocvar_menu_slist_recommendations_minhumans
+ )
+
+ && // check for maximum latency
+ (
+ gethostcachenumber(SLIST_FIELD_PING, entry)
+ <=
+ autocvar_menu_slist_recommendations_maxping
+ )