Revert cv_chams settings
Remove FRIEND_CHAMS and ENEMY_CHAMS, that way PLAYER_CHAMS always displays both teams
This commit is contained in:
parent
ab806a0a8f
commit
5321ee311e
|
@ -14,7 +14,7 @@ bool cvars_init(void) {
|
||||||
cv_bhop = REGISTER_CVAR("bhop", "1");
|
cv_bhop = REGISTER_CVAR("bhop", "1");
|
||||||
cv_autostrafe = REGISTER_CVAR("autostrafe", "0");
|
cv_autostrafe = REGISTER_CVAR("autostrafe", "0");
|
||||||
cv_esp = REGISTER_CVAR("esp", "3");
|
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_crosshair = REGISTER_CVAR("crosshair", "0");
|
||||||
cv_clmove = REGISTER_CVAR("clmove", "0");
|
cv_clmove = REGISTER_CVAR("clmove", "0");
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,10 @@
|
||||||
|
|
||||||
enum chams_settings {
|
enum chams_settings {
|
||||||
DISABLED = 0,
|
DISABLED = 0,
|
||||||
ENEMY_CHAMS = 1,
|
PLAYER_CHAMS = 1,
|
||||||
FRIEND_CHAMS = 2,
|
HAND_CHAMS = 2,
|
||||||
/* ALL_PLAYER is 3, but we can OR player and hands */
|
/* ALL 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 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
visible_flags visible_mode;
|
visible_flags visible_mode;
|
||||||
|
|
||||||
bool chams(void* this_ptr) {
|
bool chams(void* this_ptr) {
|
||||||
|
@ -34,19 +31,14 @@ bool chams(void* this_ptr) {
|
||||||
visible_mode = NONE; /* Reset for future calls */
|
visible_mode = NONE; /* Reset for future calls */
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
return true;
|
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 */
|
/* If we don't want player chams, or this is not a player, stop */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool friendly = is_friend(ent);
|
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 */
|
/* If we got here it means we are rendering a valid player */
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue