diff --git a/src/cvars.c b/src/cvars.c index cb3c2aa..07eea48 100644 --- a/src/cvars.c +++ b/src/cvars.c @@ -14,7 +14,7 @@ bool cvars_init(void) { cv_bhop = REGISTER_CVAR("bhop", "1"); cv_autostrafe = REGISTER_CVAR("autostrafe", "0"); cv_esp = REGISTER_CVAR("esp", "3"); - cv_chams = REGISTER_CVAR("chams", "3"); + cv_chams = REGISTER_CVAR("chams", "1"); cv_crosshair = REGISTER_CVAR("crosshair", "0"); cv_clmove = REGISTER_CVAR("clmove", "0"); diff --git a/src/features/chams.c b/src/features/chams.c index d334016..fe477fe 100644 --- a/src/features/chams.c +++ b/src/features/chams.c @@ -8,13 +8,10 @@ enum chams_settings { DISABLED = 0, - ENEMY_CHAMS = 1, - FRIEND_CHAMS = 2, - /* ALL_PLAYER is 3, but we can OR player and hands */ - HAND_CHAMS = 4, - /* ALL is 5, but we will convert it to 7 so every setting can be OR'd */ + PLAYER_CHAMS = 1, + HAND_CHAMS = 2, + /* ALL is 3, but we can OR player and hands */ }; - visible_flags visible_mode; bool chams(void* this_ptr) { @@ -34,19 +31,14 @@ bool chams(void* this_ptr) { visible_mode = NONE; /* Reset for future calls */ glEnable(GL_TEXTURE_2D); return true; - } else if (!valid_player(ent) || !is_alive(ent)) { + } else if (!(setting & PLAYER_CHAMS) || !valid_player(ent) || + !is_alive(ent)) { /* If we don't want player chams, or this is not a player, stop */ return false; } const bool friendly = is_friend(ent); - /* Friendly ent but we dont want to render friends OR - * Not friendly ent and we dont want to render enemies*/ - if ((friendly && !(setting & FRIEND_CHAMS)) || - (!friendly && !(setting & ENEMY_CHAMS))) - return false; - /* If we got here it means we are rendering a valid player */ glDisable(GL_TEXTURE_2D);