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

@@ -15,7 +15,7 @@ enum chams_settings {
visible_flags visible_mode;
bool chams(void* this_ptr) {
const int setting = dz_chams->value == 5.0f ? 7 : dz_chams->value;
const int setting = dz_visuals_chams->value == 5.0f ? 7 : dz_visuals_chams->value;
if (setting == DISABLED)
return false;
@@ -39,6 +39,10 @@ bool chams(void* this_ptr) {
const bool friendly = is_friend(ent);
// Check if the player is friendly and if visuals_friendly is 0
if (friendly && dz_visuals_friendly->value == 0)
return false; // Do not render chams for friendlies
/* If we got here it means we are rendering a valid player */
glDisable(GL_TEXTURE_2D);