Added dz_visuals_friendly to not render friendly players. Change all cvars to a new format.

This commit is contained in:
Wizzard
2023-09-20 14:51:49 -04:00
parent 7239d610a8
commit 7fc0a14ae6
10 changed files with 67 additions and 56 deletions

View File

@@ -98,7 +98,7 @@ static bool gl_draw2dbox(vec3_t o, int bh) {
}
void esp(void) {
const int setting = (int)dz_esp->value;
const int setting = (int)dz_visuals_esp->value;
if (setting == ESP_OFF)
return;
@@ -109,6 +109,10 @@ void esp(void) {
if (!valid_player(ent) || !is_alive(ent) || vec_is_zero(ent->origin))
continue;
// Check if the player is friendly and if visuals_friendly is 0
if (is_friend(ent) && dz_visuals_friendly->value == 0)
continue;
const int bh = (ent->curstate.usehull == 1) ? 44 : 70;
/* const int bw = 25; */