/** rankings title */ o(string, MUTATOR_ARGV_0_string) \
/**/
MUTATOR_HOOKABLE(ShowRankings, EV_ShowRankings);
+
+/** Called when drawing a player's nameplate, return true to hide it */
+#define EV_ShowNames_Draw(i, o) \
+ /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** alpha */ i(float, MUTATOR_ARGV_1_float) \
+ /***/ o(float, MUTATOR_ARGV_1_float) \
+ /**/
+MUTATOR_HOOKABLE(ShowNames_Draw, EV_ShowNames_Draw);
if (f < 0) f = 0;
a *= f;
}
- if (a < ALPHA_MIN_VISIBLE && ISGAMETYPE(CTS)) return;
+ if (MUTATOR_CALLHOOK(ShowNames_Draw, this, a)) return;
+ a = M_ARGV(1, float);
if (vdist(this.origin - view_origin, >=, max_shot_distance)) return;
float dist = vlen(this.origin - view_origin);
if (autocvar_hud_shownames_maxdistance)
if(autocvar_r_letterbox == 0)
if(autocvar_viewsize < 120)
{
- if(!(ISGAMETYPE(RACE) || ISGAMETYPE(CTS)))
+ if(!MUTATOR_CALLHOOK(DrawScoreboardAccuracy))
Accuracy_LoadLevels();
HUD_Main();
return true;
}
}
+
+MUTATOR_HOOKFUNCTION(cl_cts, ShowNames_Draw)
+{
+ return (ISGAMETYPE(CTS) && M_ARGV(1, float) < ALPHA_MIN_VISIBLE);
+}